┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <[email protected]>2012-08-23 22:58:05 -0300
committerRaphael Kubo da Costa <[email protected]>2012-08-26 01:28:59 -0300
commitd898f40f29f6328fd80165022790609972dcce7c (patch)
tree84e2b29f05ca66a650bae6ed438cdeeecac701a4
parent4e9ebb4b01440c9e4b0e4f54b2600400473f315b (diff)
Adjust to Ark's drag'n'drop D-Bus interface changes.
Ark's drag'n'drop D-Bus interface needs to be changed: so far, the object path was always /DndExtract, but this does not work if Ark is being used as an embedded KPart (in Konqueror or Rekonq, for example), as all tabs will end up calling QDBusConnection::registerObject() with the same path. Only the first call will work, and the result is that dragging and dropping from any tab previewing an archive with Ark will extract from the first archive being previewed. To fix that, applications that accept the application/x-kde-dndextract mimetype should now be adjusted to check the application/x-kde-ark-dndextract-service and application/x-kde-ark-dndextract-path ones instead; the former contains the same service information that used to be passed, while the latter tells which object path should be talked to. This is the Dolphin part of the change, which also needs to be made to the folderview plasmoid. REVIEW: 106131 CCBUG: 304860
-rw-r--r--src/views/draganddrophelper.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp
index 45e5076f6..f81d4d0bf 100644
--- a/src/views/draganddrophelper.cpp
+++ b/src/views/draganddrophelper.cpp
@@ -35,10 +35,13 @@ QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destU
}
const QMimeData* mimeData = event->mimeData();
- if (mimeData->hasFormat("application/x-kde-dndextract")) {
- const QString remoteDBusClient = mimeData->data("application/x-kde-dndextract");
- QDBusMessage message = QDBusMessage::createMethodCall(remoteDBusClient, "/DndExtract",
- "org.kde.DndExtract", "extractSelectedFilesTo");
+ if (mimeData->hasFormat("application/x-kde-ark-dndextract-service") &&
+ mimeData->hasFormat("application/x-kde-ark-dndextract-path")) {
+ const QString remoteDBusClient = mimeData->data("application/x-kde-ark-dndextract-service");
+ const QString remoteDBusPath = mimeData->data("application/x-kde-ark-dndextract-path");
+
+ QDBusMessage message = QDBusMessage::createMethodCall(remoteDBusClient, remoteDBusPath,
+ "org.kde.ark.DndExtract", "extractSelectedFilesTo");
message.setArguments(QVariantList() << destUrl.pathOrUrl());
QDBusConnection::sessionBus().call(message);
} else if (!destItem.isNull() && (destItem.isDir() || destItem.isDesktopFile())) {