diff options
| author | Peter Penz <[email protected]> | 2008-07-26 19:09:17 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-07-26 19:09:17 +0000 |
| commit | 8d189f44c4d1bf3bea71da43fef59cb772a348bc (patch) | |
| tree | e59fdde733fd935d6748f2dc9c23248ed4ead013 /src | |
| parent | 309f302c1db22e7025df63b12fc0bf94d29523b9 (diff) | |
use DBus interface instead of KRun::runCommand()
svn path=/trunk/KDE/kdebase/apps/; revision=838112
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3c52e2c71..e14cb1c2d 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -75,6 +75,7 @@ #include <kurl.h> #include <kurlcombobox.h> +#include <QDBusMessage> #include <QKeyEvent> #include <QClipboard> #include <QLineEdit> @@ -634,14 +635,11 @@ void DolphinMainWindow::quickView() const KUrl::List urls = activeViewContainer()->view()->selectedUrls(); Q_ASSERT(urls.count() > 0); - // TODO: this is a quick hack - use QDBus interface directly in future - const QString command = "qdbus org.kde.plasma /Previewer org.kde.Previewer.openFile"; + QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.plasma", "/Previewer", "", "openFile"); foreach (const KUrl& url, urls) { - QString openUrlCommand = command; - openUrlCommand.append(" \""); - openUrlCommand.append(url.prettyUrl()); - openUrlCommand.append('"'); - KRun::runCommand(openUrlCommand, 0, 0, this); + QList<QVariant> args; + msg.setArguments(QList<QVariant>() << url.prettyUrl()); + QDBusConnection::sessionBus().send(msg); } } |
