]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use KonqOperations::doDrop() instead of a custom dropping code. Still some minor...
authorPeter Penz <peter.penz19@gmail.com>
Sun, 28 Sep 2008 18:38:00 +0000 (18:38 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 28 Sep 2008 18:38:00 +0000 (18:38 +0000)
BUG: 168154

svn path=/trunk/KDE/kdebase/apps/; revision=865708

16 files changed:
src/dolphincolumnwidget.cpp
src/dolphincontroller.cpp
src/dolphincontroller.h
src/dolphindetailsview.cpp
src/dolphindropcontroller.cpp
src/dolphindropcontroller.h
src/dolphinfileplacesview.cpp
src/dolphiniconsview.cpp
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinview.cpp
src/dolphinview.h
src/sidebartreeview.cpp
src/sidebartreeview.h
src/treeviewsidebarpage.cpp
src/treeviewsidebarpage.h

index 176431b65c216dc4e25dd99a2a64ee78a9588a9f..f5d3ca435938e621b485f2cb60ca3d25f42e10c8 100644 (file)
 #include "dolphin_generalsettings.h"
 #include "draganddrophelper.h"
 #include "folderexpander.h"
-#include "kfilepreviewgenerator.h"
 #include "selectionmanager.h"
 #include "tooltipmanager.h"
 
 #include <kcolorscheme.h>
 #include <kdirlister.h>
 #include <kfileitem.h>
+#include <kfilepreviewgenerator.h>
 #include <kio/previewjob.h>
 #include <kiconeffect.h>
 #include <kjob.h>
@@ -331,16 +331,10 @@ void DolphinColumnWidget::dragMoveEvent(QDragMoveEvent* event)
 
 void DolphinColumnWidget::dropEvent(QDropEvent* event)
 {
-    const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
-    if (!urls.isEmpty()) {
-        const QModelIndex index = indexAt(event->pos());
-        m_view->m_controller->setItemView(this);
-        const KFileItem item = m_view->m_controller->itemForIndex(index);
-        m_view->m_controller->indicateDroppedUrls(urls,
-                                                  url(),
-                                                  item);
-        event->acceptProposedAction();
-    }
+    const QModelIndex index = indexAt(event->pos());
+    m_view->m_controller->setItemView(this);
+    const KFileItem item = m_view->m_controller->itemForIndex(index);
+    m_view->m_controller->indicateDroppedUrls(item, url(), event);
     QListView::dropEvent(event);
 }
 
index abbae6ec790c567eb0c05e41bf4869c2ac77d522..9732316873e589349cd6edfc83721ac0fd864900 100644 (file)
@@ -84,11 +84,11 @@ void DolphinController::requestActivation()
     emit activated();
 }
 
-void DolphinController::indicateDroppedUrls(const KUrl::List& urls,
+void DolphinController::indicateDroppedUrls(const KFileItem& destItem,
                                             const KUrl& destPath,
-                                            const KFileItem& destItem)
+                                            QDropEvent* event)
 {
-    emit urlsDropped(urls, destPath, destItem);
+    emit urlsDropped(destItem, destPath, event);
 }
 
 
index 9196a157d1578b7ad7a9621bc4a18b5606da99a0..312cea3ccc8f680064674318ebbba41bf84717c3 100644 (file)
@@ -136,13 +136,13 @@ public:
      * Indicates that URLs are dropped above a destination. This method
      * should be invoked by the view implementation. The abstract Dolphin view
      * will start the corresponding action (copy, move, link).
-     * @param urls      URLs that are dropped above a destination.
+     * @param destItem  Item of the destination (can be null, see KFileItem::isNull()).
      * @param destPath  Path of the destination.
-     * @param destItem  Destination item (can be null, see KFileItem::isNull()).
+     * @param event     Drop event
      */
-    void indicateDroppedUrls(const KUrl::List& urls,
+    void indicateDroppedUrls(const KFileItem& destItem,
                              const KUrl& destPath,
-                             const KFileItem& destItem);
+                             QDropEvent* event);
 
     /**
      * Informs the abstract Dolphin view about a sorting change done inside
@@ -262,14 +262,14 @@ signals:
     void activated();
 
     /**
-     * Is emitted if the URLs \a urls have been dropped to the destination
+     * Is emitted if URLs have been dropped to the destination
      * path \a destPath. If the URLs have been dropped above an item of
      * the destination path, the item is indicated by \a destItem
      * (can be null, see KFileItem::isNull()).
      */
-    void urlsDropped(const KUrl::List& urls,
+    void urlsDropped(const KFileItem& destItem,
                      const KUrl& destPath,
-                     const KFileItem& destItem);
+                     QDropEvent* event);
 
     /**
      * Is emitted if the sorting has been changed to \a sorting by
index 61cb0df76f7e5a45cad4a6f19f4a2e524d271af1..79a1a106d04612ff7dab19a73b5440b05ff20189 100644 (file)
@@ -349,18 +349,12 @@ void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event)
 
 void DolphinDetailsView::dropEvent(QDropEvent* event)
 {
-    const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
-    if (!urls.isEmpty()) {
-        event->acceptProposedAction();
-        const QModelIndex index = indexAt(event->pos());
-        KFileItem item;
-        if (index.isValid() && (index.column() == DolphinModel::Name)) {
-            item = m_controller->itemForIndex(index);
-        }
-        m_controller->indicateDroppedUrls(urls,
-                                          m_controller->url(),
-                                          item);
+    const QModelIndex index = indexAt(event->pos());
+    KFileItem item;
+    if (index.isValid() && (index.column() == DolphinModel::Name)) {
+        item = m_controller->itemForIndex(index);
     }
+    m_controller->indicateDroppedUrls(item, m_controller->url(), event);
     QTreeView::dropEvent(event);
 }
 
index 4fecbe6267a0b852dd03b6d18509c22379e4e8ae..6d1261d1a78d404ea75a344cfdd998182a3cb2ab 100644 (file)
@@ -19,6 +19,7 @@
  ***************************************************************************/
 
 #include "dolphindropcontroller.h"
+#include <kfileitem.h>
 #include <klocale.h>
 #include <kicon.h>
 #include <QApplication>
 #include <kmenu.h>
 #include <konq_operations.h>
 
-// TODO replace with KonqOperations::doDrop [or move doDrop code into this class]
-// Note that this means changing the DolphinDropController controller usage
-// to "create with new and let it autodelete" instead of on stack, since doDrop is async.
-// NOTE: let's wait for KDirModel::dropEvent first.
-
 DolphinDropController::DolphinDropController(QWidget* parentWidget)
     : QObject(parentWidget), m_parentWidget(parentWidget)
 {
@@ -40,90 +36,24 @@ DolphinDropController::~DolphinDropController()
 {
 }
 
-void DolphinDropController::dropUrls(const KUrl::List& urls,
-                                     const KUrl& destination)
+void DolphinDropController::dropUrls(const KFileItem& destItem,
+                                     const KUrl& destPath,
+                                     QDropEvent* event)
 {
-    kDebug() << "Source" << urls;
-    kDebug() << "Destination:" << destination;
-
-    if (destination.protocol() == "trash") {
-        KonqOperations::del(m_parentWidget, KonqOperations::TRASH, urls);
-        return;
-    }
-
-    Qt::DropAction action = Qt::CopyAction;
-
-    Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
-    const bool shiftPressed   = modifier & Qt::ShiftModifier;
-    const bool controlPressed = modifier & Qt::ControlModifier;
-    const bool altPressed = modifier & Qt::AltModifier;
-    if ((shiftPressed && controlPressed) || altPressed) {
-        action = Qt::LinkAction;
-    } else if (controlPressed) {
-        action = Qt::CopyAction;
-    } else if (shiftPressed) {
-        action = Qt::MoveAction;
-    } else {
-        // open a context menu which offers the following actions:
-        // - Move Here
-        // - Copy Here
-        // - Link Here
-        // - Cancel
-
-        KMenu popup(m_parentWidget);
-
-        QString seq = QKeySequence(Qt::ShiftModifier).toString();
-        seq.chop(1); // chop superfluous '+'
-        QAction* moveAction = popup.addAction(KIcon("go-jump"),
-                                              i18nc("@action:inmenu",
-                                                    "&Move Here\t<shortcut>%1</shortcut>", seq));
-
-        seq = QKeySequence(Qt::ControlModifier).toString();
-        seq.chop(1);
-        QAction* copyAction = popup.addAction(KIcon("edit-copy"),
-                                              i18nc("@action:inmenu",
-                                                    "&Copy Here\t<shortcut>%1</shortcut>", seq));
-
-        seq = QKeySequence(Qt::ControlModifier + Qt::ShiftModifier).toString();
-        seq.chop(1);
-        QAction* linkAction = popup.addAction(KIcon("edit-link"),
-                                              i18nc("@action:inmenu",
-                                                    "&Link Here\t<shortcut>%1</shortcut>", seq));
-
-        popup.addSeparator();
-        popup.addAction(KIcon("process-stop"), i18nc("@action:inmenu", "Cancel"));
-
-        QAction* activatedAction = popup.exec(QCursor::pos());
-        if (activatedAction == moveAction) {
-            action = Qt::MoveAction;
-        } else if (activatedAction == copyAction) {
-            action = Qt::CopyAction;
-        } else if (activatedAction == linkAction) {
-            action = Qt::LinkAction;
+    const bool dropToItem = !destItem.isNull() && (destItem.isDir() || destItem.isDesktopFile());
+    const KUrl destination = dropToItem ? destItem.url() : destPath;
+                             
+    const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
+    const KUrl sourceDir = KUrl(urls.first().directory());
+    if (sourceDir != destination) {
+        if (dropToItem) {
+            KonqOperations::doDrop(destItem, destination, event, m_parentWidget);
         } else {
-            return;
+            KonqOperations::doDrop(KFileItem(), destination, event, m_parentWidget);
         }
     }
-
-    switch (action) {
-    case Qt::MoveAction:
-        KonqOperations::copy(m_parentWidget, KonqOperations::MOVE, urls, destination);
-        emit doingOperation(KIO::FileUndoManager::Move);
-        break;
-
-    case Qt::CopyAction:
-        KonqOperations::copy(m_parentWidget, KonqOperations::COPY, urls, destination);
-        emit doingOperation(KIO::FileUndoManager::Copy);
-        break;
-
-    case Qt::LinkAction:
-        KonqOperations::copy(m_parentWidget, KonqOperations::LINK, urls, destination);
-        emit doingOperation(KIO::FileUndoManager::Link);
-        break;
-
-    default:
-        break;
-    }
+    // TODO: emit doingOperation, so that the main window gets informed about
+    // about the finished operations
 }
 
 #include "dolphindropcontroller.moc"
index 955d1614cab4604b98ef4321268be7fde84aebce..64795580209a9b9cf8b0a3afa0cb90764ae6bd94 100644 (file)
 #define DOLPHINDROPCONTROLLER_H
 
 #include <QObject>
-#include <kurl.h>
 #include <kio/fileundomanager.h>
 
 #include "libdolphin_export.h"
 
+class QDropEvent;
+class KUrl;
+class KFileItem;
+
 /**
  * @brief Handler for drop events, shared between DolphinView and TreeViewSidebarPage
  */
@@ -41,14 +44,13 @@ public:
      * destination. A context menu with the options
      * 'Move Here', 'Copy Here', 'Link Here' and
      * 'Cancel' is offered to the user.
-     * @param urls        List of URLs which have been
-     *                    dropped.
-     * @param destination Destination URL, where the
-     *                    list or URLs should be moved,
-     *                    copied or linked to.
+     * @param destItem  Item of the destination (can be null, see KFileItem::isNull()).
+     * @param destPath  Path of the destination.
+     * @param event     Drop event
      */
-    void dropUrls(const KUrl::List& urls,
-                  const KUrl& destination);
+    void dropUrls(const KFileItem& destItem,
+                  const KUrl& destPath,
+                  QDropEvent* event);
 
 signals:
     /**
index 4165b90490c71eb31d808f3b339c2143620834b6..a2291275d1e266dbac32c54ddf37c27095634bc7 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "dolphinfileplacesview.h"
 #include "dolphindropcontroller.h"
+#include <kfileitem.h>
 #include <konq_operations.h>
 
 DolphinFilePlacesView::DolphinFilePlacesView(QWidget* parent) :
@@ -44,13 +45,11 @@ void DolphinFilePlacesView::mousePressEvent(QMouseEvent* event)
 
 void DolphinFilePlacesView::slotUrlsDropped(const KUrl& dest, QDropEvent* event, QWidget* parent)
 {
-    const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
-
     DolphinDropController dropController(parent);
     // forward doingOperation signal up to the mainwindow
     connect(&dropController, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)),
             this, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)));
-    dropController.dropUrls(urls, dest);
+    dropController.dropUrls(KFileItem(), dest, event);
 }
 
 void DolphinFilePlacesView::emitExtendedUrlChangedSignal(const KUrl& url)
index 9947a27551e8a40e6711190d28e9a211dbef20fa..14a8b9fcaa3ca9ae9ea1a7980293802e24b46299 100644 (file)
@@ -252,17 +252,9 @@ void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event)
 
 void DolphinIconsView::dropEvent(QDropEvent* event)
 {
-    if (!selectionModel()->isSelected(indexAt(event->pos()))) {
-        const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
-        if (!urls.isEmpty()) {
-            const QModelIndex index = indexAt(event->pos());
-            const KFileItem item = m_controller->itemForIndex(index);
-            m_controller->indicateDroppedUrls(urls,
-                                              m_controller->url(),
-                                              item);
-            event->acceptProposedAction();
-        }
-    }
+    const QModelIndex index = indexAt(event->pos());
+    const KFileItem item = m_controller->itemForIndex(index);
+    m_controller->indicateDroppedUrls(item, m_controller->url(), event);
 
     KCategorizedView::dropEvent(event);
 }
index da7f8e1707f30439f531efd95c79a8f8f0eecfd9..2ab72536715094852cc90dd0014ec27c083d6868 100644 (file)
@@ -82,6 +82,8 @@
 #include <QSplitter>
 #include <QDockWidget>
 
+#include <kdebug.h>
+
 DolphinMainWindow::DolphinMainWindow(int id) :
     KXmlGuiWindow(0),
     m_newMenu(0),
@@ -155,13 +157,14 @@ void DolphinMainWindow::refreshViews()
     setActiveViewContainer(activeViewContainer);
 }
 
-void DolphinMainWindow::dropUrls(const KUrl::List& urls,
-                                 const KUrl& destination)
+void DolphinMainWindow::dropUrls(const KFileItem& destItem,
+                                 const KUrl& destPath,
+                                 QDropEvent* event)
 {
     DolphinDropController dropController(this);
     connect(&dropController, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)),
             this, SLOT(slotDoingOperation(KIO::FileUndoManager::CommandType)));
-    dropController.dropUrls(urls, destination);
+    dropController.dropUrls(destItem, destPath, event);
 }
 
 void DolphinMainWindow::pasteIntoFolder()
@@ -1056,8 +1059,9 @@ void DolphinMainWindow::setupDockWidgets()
             this, SLOT(handlePlacesClick(KUrl, Qt::MouseButtons)));
     connect(treeWidget, SIGNAL(changeSelection(KFileItemList)),
             this, SLOT(changeSelection(KFileItemList)));
-    connect(treeWidget, SIGNAL(urlsDropped(KUrl::List, KUrl)),
-            this, SLOT(dropUrls(KUrl::List, KUrl)));
+    // TODO: connecting to urlsDropped() fails!
+    connect(treeWidget, SIGNAL(urlsDropped(KFileItem&, KUrl&, QDropEvent*)),
+            this, SLOT(dropUrls(KFileItem&, KUrl&, QDropEvent*)));
 
     // setup "Terminal"
 #ifndef Q_OS_WIN
index 48a829e39ef24eab3a0fc84077232241b12b3b02..2b7b247b5c24c7006ab493d7d6c277cd30aa4c8b 100644 (file)
@@ -41,6 +41,7 @@ class DolphinViewContainer;
 class KNewMenu;
 class KTabBar;
 class KUrl;
+class QDropEvent;
 class QSplitter;
 
 /**
@@ -107,8 +108,9 @@ public slots:
      * Handles the dropping of URLs to the given
      * destination. This is only called by the TreeViewSidebarPage.
      */
-    void dropUrls(const KUrl::List& urls,
-                  const KUrl& destination);
+    void dropUrls(const KFileItem& destItem,
+                  const KUrl& destPath,
+                  QDropEvent* event);
 
     /**
      * Pastes the clipboard data into the currently selected folder
index c5e637c166bb234eec57d6767b930c820d73cdcf..64aa10fd4847f1f2e042338be872a95464e4cee1 100644 (file)
@@ -32,6 +32,7 @@
 #include <kcolorscheme.h>
 #include <kdirlister.h>
 #include <kfileitemdelegate.h>
+#include <kfilepreviewgenerator.h>
 #include <kiconeffect.h>
 #include <klocale.h>
 #include <kio/deletejob.h>
@@ -58,7 +59,6 @@
 #include "dolphinsettings.h"
 #include "dolphin_generalsettings.h"
 #include "folderexpander.h"
-#include "kfilepreviewgenerator.h"
 #include "renamedialog.h"
 #include "tooltipmanager.h"
 #include "viewproperties.h"
@@ -106,8 +106,8 @@ DolphinView::DolphinView(QWidget* parent,
 
     connect(m_controller, SIGNAL(requestContextMenu(const QPoint&)),
             this, SLOT(openContextMenu(const QPoint&)));
-    connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&, const KFileItem&)),
-            this, SLOT(dropUrls(const KUrl::List&, const KUrl&, const KFileItem&)));
+    connect(m_controller, SIGNAL(urlsDropped(const KFileItem&, const KUrl&, QDropEvent*)),
+            this, SLOT(dropUrls(const KFileItem&, const KUrl&, QDropEvent*)));
     connect(m_controller, SIGNAL(sortingChanged(DolphinView::Sorting)),
             this, SLOT(updateSorting(DolphinView::Sorting)));
     connect(m_controller, SIGNAL(sortOrderChanged(Qt::SortOrder)),
@@ -816,21 +816,15 @@ void DolphinView::openContextMenu(const QPoint& pos)
     m_isContextMenuOpen = false;
 }
 
-void DolphinView::dropUrls(const KUrl::List& urls,
+void DolphinView::dropUrls(const KFileItem& destItem,
                            const KUrl& destPath,
-                           const KFileItem& destItem)
-{
-    Q_ASSERT(!urls.isEmpty());
-    const KUrl destination = !destItem.isNull() && destItem.isDir() ?
-                             destItem.url() : destPath;
-    const KUrl sourceDir = KUrl(urls.first().directory());
-    if (sourceDir != destination) {
-        DolphinDropController dropController(this);
-        // forward doingOperation signal up to the mainwindow
-        connect(&dropController, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)),
-                this, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)));
-        dropController.dropUrls(urls, destination);
-    }
+                           QDropEvent* event)
+{
+    DolphinDropController dropController(this);
+    // forward doingOperation signal up to the mainwindow
+    connect(&dropController, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)),
+            this, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)));
+    dropController.dropUrls(destItem, destPath, event);
 }
 
 void DolphinView::updateSorting(DolphinView::Sorting sorting)
index f0bacb9895555084f4cc166e2f5fa9e433b5a3fb..661ef73d5da153fecc7c12594f1ee5715a9a6351 100644 (file)
@@ -549,13 +549,13 @@ private slots:
     void openContextMenu(const QPoint& pos);
 
     /**
-     * Drops the URLs \a urls to the destination path \a destPath. If
+     * Drops dragged URLs to the destination path \a destPath. If
      * the URLs are dropped above an item inside the destination path,
      * the item is indicated by \a destItem.
      */
-    void dropUrls(const KUrl::List& urls,
+    void dropUrls(const KFileItem& destItem,
                   const KUrl& destPath,
-                  const KFileItem& destItem);
+                  QDropEvent* event);
 
     /**
      * Updates the view properties of the current URL to the
index 0b18c260a04ba7c38c9c4320918b7586767c3732..00c98f6e7e7d7c89346fef4d5558eb31d00371f5 100644 (file)
@@ -125,16 +125,11 @@ void SidebarTreeView::dragMoveEvent(QDragMoveEvent* event)
 
 void SidebarTreeView::dropEvent(QDropEvent* event)
 {
-    const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
-    if (urls.isEmpty()) {
-        KTreeView::dropEvent(event);
-    } else {
-        event->acceptProposedAction();
-        const QModelIndex index = indexAt(event->pos());
-        if (index.isValid()) {
-            emit urlsDropped(urls, index);
-        }
+    const QModelIndex index = indexAt(event->pos());
+    if (index.isValid()) {
+        emit urlsDropped(index, event);
     }
+    KTreeView::dropEvent(event);
 }
 
 #include "sidebartreeview.moc"
index f692be3a2cf1bbc7be0815a7d3cc84abbfb50175..93bcbae2eb48e12764f0d6edb847779b50f55368 100644 (file)
@@ -38,11 +38,10 @@ public:
 
 signals:
     /**
-      * Is emitted if the URLs \a urls have been dropped to
+      * Is emitted if the URL have been dropped to
       * the index \a index.
       */
-    void urlsDropped(const KUrl::List& urls,
-                     const QModelIndex& index);
+    void urlsDropped(const QModelIndex& index, QDropEvent* event);
 
 protected:
     virtual bool event(QEvent* event);
index cbb6ecf8a26628f3a7877ff60929dd3195291225..d349f7b0b27bacf04dc64fe0d45b0787f6c3ff46 100644 (file)
@@ -164,8 +164,8 @@ void TreeViewSidebarPage::showEvent(QShowEvent* event)
 
         connect(m_treeView, SIGNAL(clicked(const QModelIndex&)),
                 this, SLOT(updateActiveView(const QModelIndex&)));
-        connect(m_treeView, SIGNAL(urlsDropped(const KUrl::List&, const QModelIndex&)),
-                this, SLOT(dropUrls(const KUrl::List&, const QModelIndex&)));
+        connect(m_treeView, SIGNAL(urlsDropped(const QModelIndex&, QDropEvent*)),
+                this, SLOT(dropUrls(const QModelIndex&, QDropEvent*)));
         connect(m_treeView, SIGNAL(pressed(const QModelIndex&)),
                 this, SLOT(updateMouseButtons()));
 
@@ -203,15 +203,14 @@ void TreeViewSidebarPage::updateActiveView(const QModelIndex& index)
     }
 }
 
-void TreeViewSidebarPage::dropUrls(const KUrl::List& urls,
-                                   const QModelIndex& index)
+void TreeViewSidebarPage::dropUrls(const QModelIndex& index, QDropEvent* event)
 {
     if (index.isValid()) {
         const QModelIndex dirIndex = m_proxyModel->mapToSource(index);
         KFileItem item = m_dolphinModel->itemForIndex(dirIndex);
         Q_ASSERT(!item.isNull());
         if (item.isDir()) {
-            emit urlsDropped(urls, item.url());
+            emit urlsDropped(item, item.url(), event);
         }
     }
 }
index 6bc0ae6c3a44e856bdafc49e360d73dad1ad375f..80db7840b6363e79b6cfbad2ea6ffe40c9f68612 100644 (file)
@@ -72,7 +72,7 @@ signals:
      * This signal is emitted whenever a drop action on this widget needs the
      * MainWindow's attention.
      */
-    void urlsDropped(const KUrl::List& urls, const KUrl& destination);
+    void urlsDropped(const KFileItem& destItem, const KUrl& destPath, QDropEvent* event);
 
 public slots:
     /**
@@ -95,10 +95,10 @@ private slots:
     void updateActiveView(const QModelIndex& index);
 
     /**
-     * Is emitted if the URLs \a urls have been dropped
-     * to the index \a index. */
-    void dropUrls(const KUrl::List& urls,
-                  const QModelIndex& index);
+     * Is emitted if URLs have been dropped
+     * to the index \a index.
+     */
+    void dropUrls(const QModelIndex& index, QDropEvent* event);
 
     /**
      * Invokes expandToLeafDir() asynchronously (the expanding