]> cloud.milkyroute.net Git - dolphin.git/commitdiff
* adjusted Dolphin to use KonqOperations::doDrop() instead of using a custom implemen...
authorPeter Penz <peter.penz19@gmail.com>
Wed, 1 Oct 2008 21:39:35 +0000 (21:39 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Wed, 1 Oct 2008 21:39:35 +0000 (21:39 +0000)
* used new signals jobRecordingStarted() and jobRecordingFinished from FileUndoManager to inform the user in the statusbar when a recorded command has been finished

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

src/dolphindropcontroller.cpp
src/dolphindropcontroller.h
src/dolphinfileplacesview.cpp
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinview.cpp
src/dolphinview.h
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h
src/treeviewsidebarpage.cpp
src/treeviewsidebarpage.h

index 6d1261d1a78d404ea75a344cfdd998182a3cb2ab..40fccf0d2011cd2c4b9f1aca7a5abb3ad72e7cf6 100644 (file)
 
 #include "dolphindropcontroller.h"
 #include <kfileitem.h>
 
 #include "dolphindropcontroller.h"
 #include <kfileitem.h>
-#include <klocale.h>
-#include <kicon.h>
-#include <QApplication>
-#include <kdebug.h>
-#include <kmenu.h>
 #include <konq_operations.h>
 
 #include <konq_operations.h>
 
-DolphinDropController::DolphinDropController(QWidget* parentWidget)
-    : QObject(parentWidget), m_parentWidget(parentWidget)
-{
-}
-
-DolphinDropController::~DolphinDropController()
-{
-}
-
 void DolphinDropController::dropUrls(const KFileItem& destItem,
                                      const KUrl& destPath,
 void DolphinDropController::dropUrls(const KFileItem& destItem,
                                      const KUrl& destPath,
-                                     QDropEvent* event)
+                                     QDropEvent* event,
+                                     QWidget* widget)
 {
     const bool dropToItem = !destItem.isNull() && (destItem.isDir() || destItem.isDesktopFile());
     const KUrl destination = dropToItem ? destItem.url() : destPath;
 {
     const bool dropToItem = !destItem.isNull() && (destItem.isDir() || destItem.isDesktopFile());
     const KUrl destination = dropToItem ? destItem.url() : destPath;
@@ -47,13 +34,9 @@ void DolphinDropController::dropUrls(const KFileItem& destItem,
     const KUrl sourceDir = KUrl(urls.first().directory());
     if (sourceDir != destination) {
         if (dropToItem) {
     const KUrl sourceDir = KUrl(urls.first().directory());
     if (sourceDir != destination) {
         if (dropToItem) {
-            KonqOperations::doDrop(destItem, destination, event, m_parentWidget);
+            KonqOperations::doDrop(destItem, destination, event, widget);
         } else {
         } else {
-            KonqOperations::doDrop(KFileItem(), destination, event, m_parentWidget);
+            KonqOperations::doDrop(KFileItem(), destination, event, widget);
         }
     }
         }
     }
-    // TODO: emit doingOperation, so that the main window gets informed about
-    // about the finished operations
-}
-
-#include "dolphindropcontroller.moc"
+}
\ No newline at end of file
index 64795580209a9b9cf8b0a3afa0cb90764ae6bd94..f4e7c84c2041e20237a9f9c430083e3f273f2e01 100644 (file)
 #ifndef DOLPHINDROPCONTROLLER_H
 #define DOLPHINDROPCONTROLLER_H
 
 #ifndef DOLPHINDROPCONTROLLER_H
 #define DOLPHINDROPCONTROLLER_H
 
-#include <QObject>
-#include <kio/fileundomanager.h>
-
 #include "libdolphin_export.h"
 
 class QDropEvent;
 #include "libdolphin_export.h"
 
 class QDropEvent;
+class QWidget;
 class KUrl;
 class KFileItem;
 
 /**
  * @brief Handler for drop events, shared between DolphinView and TreeViewSidebarPage
  */
 class KUrl;
 class KFileItem;
 
 /**
  * @brief Handler for drop events, shared between DolphinView and TreeViewSidebarPage
  */
-class LIBDOLPHINPRIVATE_EXPORT DolphinDropController : public QObject
+class LIBDOLPHINPRIVATE_EXPORT DolphinDropController
 {
 {
-    Q_OBJECT
 public:
 public:
-    explicit DolphinDropController(QWidget* parentWidget);
-    virtual ~DolphinDropController();
-
     /**
      * Handles the dropping of URLs to the given
      * destination. A context menu with the options
     /**
      * Handles the dropping of URLs to the given
      * destination. A context menu with the options
@@ -46,21 +40,13 @@ public:
      * 'Cancel' is offered to the user.
      * @param destItem  Item of the destination (can be null, see KFileItem::isNull()).
      * @param destPath  Path of the destination.
      * 'Cancel' is offered to the user.
      * @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 KFileItem& destItem,
-                  const KUrl& destPath,
-                  QDropEvent* event);
-
-signals:
-    /**
-     * Is emitted when renaming, copying, moving, linking etc.
-     * Used for feedback in the mainwindow.
+     * @param event     Drop event.
+     * @param widget    Source widget where the dragging has been started.
      */
      */
-    void doingOperation(KIO::FileUndoManager::CommandType type);
-
-private:
-    QWidget* m_parentWidget;
+    static void dropUrls(const KFileItem& destItem,
+                         const KUrl& destPath,
+                         QDropEvent* event,
+                         QWidget* widget);
 };
 
 #endif // DOLPHINDROPCONTROLLER_H
 };
 
 #endif // DOLPHINDROPCONTROLLER_H
index a2291275d1e266dbac32c54ddf37c27095634bc7..c6626e010a5796db0281c17ab017ef0305563e3f 100644 (file)
@@ -45,11 +45,7 @@ void DolphinFilePlacesView::mousePressEvent(QMouseEvent* event)
 
 void DolphinFilePlacesView::slotUrlsDropped(const KUrl& dest, QDropEvent* event, QWidget* parent)
 {
 
 void DolphinFilePlacesView::slotUrlsDropped(const KUrl& dest, QDropEvent* event, QWidget* parent)
 {
-    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(KFileItem(), dest, event);
+    DolphinDropController::dropUrls(KFileItem(), dest, event, parent);
 }
 
 void DolphinFilePlacesView::emitExtendedUrlChangedSignal(const KUrl& url)
 }
 
 void DolphinFilePlacesView::emitExtendedUrlChangedSignal(const KUrl& url)
index 588404aaa818c67dc6cb528a487009602e84c870..48f085e336bf872d6e13d30fe810fc3e26acb9bf 100644 (file)
@@ -110,6 +110,10 @@ DolphinMainWindow::DolphinMainWindow(int id) :
             this, SLOT(slotUndoAvailable(bool)));
     connect(undoManager, SIGNAL(undoTextChanged(const QString&)),
             this, SLOT(slotUndoTextChanged(const QString&)));
             this, SLOT(slotUndoAvailable(bool)));
     connect(undoManager, SIGNAL(undoTextChanged(const QString&)),
             this, SLOT(slotUndoTextChanged(const QString&)));
+    connect(undoManager, SIGNAL(jobRecordingStarted(CommandType)),
+            this, SLOT(clearStatusBar()));
+    connect(undoManager, SIGNAL(jobRecordingFinished(CommandType)),
+            this, SLOT(showCommand(CommandType)));
     connect(DolphinSettings::instance().placesModel(), SIGNAL(errorMessage(const QString&)),
             this, SLOT(slotHandlePlacesError(const QString&)));
 }
     connect(DolphinSettings::instance().placesModel(), SIGNAL(errorMessage(const QString&)),
             this, SLOT(slotHandlePlacesError(const QString&)));
 }
@@ -134,10 +138,39 @@ void DolphinMainWindow::toggleViews()
     m_viewTab[m_tabIndex].secondaryView = container;
 }
 
     m_viewTab[m_tabIndex].secondaryView = container;
 }
 
-void DolphinMainWindow::slotDoingOperation(KIO::FileUndoManager::CommandType commandType)
+void DolphinMainWindow::showCommand(CommandType command)
 {
 {
-    clearStatusBar();
-    m_undoCommandTypes.append(commandType);
+    DolphinStatusBar* statusBar = m_activeViewContainer->statusBar();
+    switch (command) {
+    case KIO::FileUndoManager::Copy:
+        statusBar->setMessage(i18nc("@info:status", "Copy operation completed."),
+                              DolphinStatusBar::OperationCompleted);
+        break;
+    case KIO::FileUndoManager::Move:
+        statusBar->setMessage(i18nc("@info:status", "Move operation completed."),
+                              DolphinStatusBar::OperationCompleted);
+        break;
+    case KIO::FileUndoManager::Link:
+        statusBar->setMessage(i18nc("@info:status", "Link operation completed."),
+                              DolphinStatusBar::OperationCompleted);
+        break;
+    case KIO::FileUndoManager::Trash:
+        statusBar->setMessage(i18nc("@info:status", "Move to trash operation completed."),
+                              DolphinStatusBar::OperationCompleted);
+        break;
+    case KIO::FileUndoManager::Rename:
+        statusBar->setMessage(i18nc("@info:status", "Renaming operation completed."),
+                              DolphinStatusBar::OperationCompleted);
+        break;
+
+    case KIO::FileUndoManager::Mkdir:
+        statusBar->setMessage(i18nc("@info:status", "Created folder."),
+                              DolphinStatusBar::OperationCompleted);
+        break;
+
+    default:
+        break;
+    }
 }
 
 void DolphinMainWindow::refreshViews()
 }
 
 void DolphinMainWindow::refreshViews()
@@ -157,16 +190,6 @@ void DolphinMainWindow::refreshViews()
     setActiveViewContainer(activeViewContainer);
 }
 
     setActiveViewContainer(activeViewContainer);
 }
 
-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(destItem, destPath, event);
-}
-
 void DolphinMainWindow::pasteIntoFolder()
 {
     m_activeViewContainer->view()->pasteIntoFolder();
 void DolphinMainWindow::pasteIntoFolder()
 {
     m_activeViewContainer->view()->pasteIntoFolder();
@@ -380,42 +403,6 @@ void DolphinMainWindow::slotUndoAvailable(bool available)
     if (undoAction != 0) {
         undoAction->setEnabled(available);
     }
     if (undoAction != 0) {
         undoAction->setEnabled(available);
     }
-
-    if (available && (m_undoCommandTypes.count() > 0)) {
-        const KIO::FileUndoManager::CommandType command = m_undoCommandTypes.takeFirst();
-        DolphinStatusBar* statusBar = m_activeViewContainer->statusBar();
-        switch (command) {
-        case KIO::FileUndoManager::Copy:
-            statusBar->setMessage(i18nc("@info:status", "Copy operation completed."),
-                                  DolphinStatusBar::OperationCompleted);
-            break;
-        case KIO::FileUndoManager::Move:
-            statusBar->setMessage(i18nc("@info:status", "Move operation completed."),
-                                  DolphinStatusBar::OperationCompleted);
-            break;
-        case KIO::FileUndoManager::Link:
-            statusBar->setMessage(i18nc("@info:status", "Link operation completed."),
-                                  DolphinStatusBar::OperationCompleted);
-            break;
-        case KIO::FileUndoManager::Trash:
-            statusBar->setMessage(i18nc("@info:status", "Move to trash operation completed."),
-                                  DolphinStatusBar::OperationCompleted);
-            break;
-        case KIO::FileUndoManager::Rename:
-            statusBar->setMessage(i18nc("@info:status", "Renaming operation completed."),
-                                  DolphinStatusBar::OperationCompleted);
-            break;
-
-        case KIO::FileUndoManager::Mkdir:
-            statusBar->setMessage(i18nc("@info:status", "Created folder."),
-                                  DolphinStatusBar::OperationCompleted);
-            break;
-
-        default:
-            break;
-        }
-
-    }
 }
 
 void DolphinMainWindow::slotUndoTextChanged(const QString& text)
 }
 
 void DolphinMainWindow::slotUndoTextChanged(const QString& text)
@@ -1059,8 +1046,6 @@ void DolphinMainWindow::setupDockWidgets()
             this, SLOT(handlePlacesClick(KUrl, Qt::MouseButtons)));
     connect(treeWidget, SIGNAL(changeSelection(KFileItemList)),
             this, SLOT(changeSelection(KFileItemList)));
             this, SLOT(handlePlacesClick(KUrl, Qt::MouseButtons)));
     connect(treeWidget, SIGNAL(changeSelection(KFileItemList)),
             this, SLOT(changeSelection(KFileItemList)));
-    connect(treeWidget, SIGNAL(urlsDropped(KFileItem, KUrl, QDropEvent*)),
-            this, SLOT(dropUrls(KFileItem, KUrl, QDropEvent*)));
 
     // setup "Terminal"
 #ifndef Q_OS_WIN
 
     // setup "Terminal"
 #ifndef Q_OS_WIN
@@ -1174,8 +1159,6 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container)
             this, SLOT(slotRequestItemInfo(KFileItem)));
     connect(view, SIGNAL(activated()),
             this, SLOT(toggleActiveView()));
             this, SLOT(slotRequestItemInfo(KFileItem)));
     connect(view, SIGNAL(activated()),
             this, SLOT(toggleActiveView()));
-    connect(view, SIGNAL(doingOperation(KIO::FileUndoManager::CommandType)),
-            this, SLOT(slotDoingOperation(KIO::FileUndoManager::CommandType)));
     connect(view, SIGNAL(tabRequested(const KUrl&)),
             this, SLOT(openNewTab(const KUrl&)));
 
     connect(view, SIGNAL(tabRequested(const KUrl&)),
             this, SLOT(openNewTab(const KUrl&)));
 
index 2b7b247b5c24c7006ab493d7d6c277cd30aa4c8b..a9db9a3e2c5aa40900916a98dd5cae4149d36781 100644 (file)
@@ -34,6 +34,8 @@
 
 #include <QtCore/QList>
 
 
 #include <QtCore/QList>
 
+typedef KIO::FileUndoManager::CommandType CommandType;
+
 class KAction;
 class DolphinViewActionHandler;
 class DolphinApplication;
 class KAction;
 class DolphinViewActionHandler;
 class DolphinApplication;
@@ -104,14 +106,6 @@ public:
     KAction* showMenuBarAction() const;
 
 public slots:
     KAction* showMenuBarAction() const;
 
 public slots:
-    /**
-     * Handles the dropping of URLs to the given
-     * destination. This is only called by the TreeViewSidebarPage.
-     */
-    void dropUrls(const KFileItem& destItem,
-                  const KUrl& destPath,
-                  QDropEvent* event);
-
     /**
      * Pastes the clipboard data into the currently selected folder
      * of the active view. If not exactly one folder is selected,
     /**
      * Pastes the clipboard data into the currently selected folder
      * of the active view. If not exactly one folder is selected,
@@ -314,8 +308,11 @@ private slots:
     /** Toggles the active view if two views are shown within the main window. */
     void toggleActiveView();
 
     /** Toggles the active view if two views are shown within the main window. */
     void toggleActiveView();
 
-    /** Called when the view is doing a file operation, like renaming, copying, moving etc. */
-    void slotDoingOperation(KIO::FileUndoManager::CommandType type);
+    /**
+     * Indicates in the statusbar that the execution of the command \a command
+     * has been finished.
+     */
+    void showCommand(CommandType command);
 
     /**
      * Activates the tab with the index \a index, which means that the current view
 
     /**
      * Activates the tab with the index \a index, which means that the current view
@@ -423,9 +420,6 @@ private:
     QList<ViewTab> m_viewTab;
 
     DolphinViewActionHandler* m_actionHandler;
     QList<ViewTab> m_viewTab;
 
     DolphinViewActionHandler* m_actionHandler;
-
-    /// remember pending undo operations until they are finished
-    QList<KIO::FileUndoManager::CommandType> m_undoCommandTypes;
 };
 
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const
 };
 
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const
index 64aa10fd4847f1f2e042338be872a95464e4cee1..b3be62252762e470580759d2d5c1a9a4579e9f2b 100644 (file)
@@ -558,7 +558,6 @@ void DolphinView::renameSelectedItems()
                     KUrl newUrl = oldUrl;
                     newUrl.setFileName(name);
                     KonqOperations::rename(this, oldUrl, newUrl);
                     KUrl newUrl = oldUrl;
                     newUrl.setFileName(name);
                     KonqOperations::rename(this, oldUrl, newUrl);
-                    emit doingOperation(KIO::FileUndoManager::Rename);
                 }
             }
         }
                 }
             }
         }
@@ -588,14 +587,12 @@ void DolphinView::renameSelectedItems()
             KUrl newUrl = oldUrl;
             newUrl.setFileName(newName);
             KonqOperations::rename(this, oldUrl, newUrl);
             KUrl newUrl = oldUrl;
             newUrl.setFileName(newName);
             KonqOperations::rename(this, oldUrl, newUrl);
-            emit doingOperation(KIO::FileUndoManager::Rename);
         }
     }
 }
 
 void DolphinView::trashSelectedItems()
 {
         }
     }
 }
 
 void DolphinView::trashSelectedItems()
 {
-    emit doingOperation(KIO::FileUndoManager::Trash);
     const KUrl::List list = simplifiedSelectedUrls();
     KonqOperations::del(this, KonqOperations::TRASH, list);
 }
     const KUrl::List list = simplifiedSelectedUrls();
     KonqOperations::del(this, KonqOperations::TRASH, list);
 }
@@ -820,11 +817,7 @@ void DolphinView::dropUrls(const KFileItem& destItem,
                            const KUrl& destPath,
                            QDropEvent* event)
 {
                            const KUrl& destPath,
                            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);
+    DolphinDropController::dropUrls(destItem, destPath, event, this);
 }
 
 void DolphinView::updateSorting(DolphinView::Sorting sorting)
 }
 
 void DolphinView::updateSorting(DolphinView::Sorting sorting)
@@ -1252,11 +1245,9 @@ void DolphinView::pasteToUrl(const KUrl& url)
     const KUrl::List sourceUrls = KUrl::List::fromMimeData(mimeData);
     if (KonqMimeData::decodeIsCutSelection(mimeData)) {
         KonqOperations::copy(this, KonqOperations::MOVE, sourceUrls, url);
     const KUrl::List sourceUrls = KUrl::List::fromMimeData(mimeData);
     if (KonqMimeData::decodeIsCutSelection(mimeData)) {
         KonqOperations::copy(this, KonqOperations::MOVE, sourceUrls, url);
-        emit doingOperation(KIO::FileUndoManager::Move);
         clipboard->clear();
     } else {
         KonqOperations::copy(this, KonqOperations::COPY, sourceUrls, url);
         clipboard->clear();
     } else {
         KonqOperations::copy(this, KonqOperations::COPY, sourceUrls, url);
-        emit doingOperation(KIO::FileUndoManager::Copy);
     }
 }
 
     }
 }
 
index 661ef73d5da153fecc7c12594f1ee5715a9a6351..6546c457ed5ab9878abec090aed7eee6c63a35a5 100644 (file)
@@ -513,12 +513,6 @@ signals:
      */
     void startedPathLoading(const KUrl& url);
 
      */
     void startedPathLoading(const KUrl& url);
 
-    /**
-     * Is emitted when renaming, copying, moving, linking etc.
-     * Used for feedback in the mainwindow.
-     */
-    void doingOperation(KIO::FileUndoManager::CommandType type);
-
 protected:
     /** @see QWidget::mouseReleaseEvent */
     virtual void mouseReleaseEvent(QMouseEvent* event);
 protected:
     /** @see QWidget::mouseReleaseEvent */
     virtual void mouseReleaseEvent(QMouseEvent* event);
index cccce3fadbfb1ea0a4934ded79c129905733aca8..c5ec6995997558642f15a5710a4832f03bdc4c55 100644 (file)
@@ -46,6 +46,7 @@
 #include "dolphinmodel.h"
 #include "dolphincolumnview.h"
 #include "dolphincontroller.h"
 #include "dolphinmodel.h"
 #include "dolphincolumnview.h"
 #include "dolphincontroller.h"
+#include "dolphindropcontroller.h"
 #include "dolphinstatusbar.h"
 #include "dolphinmainwindow.h"
 #include "dolphindirlister.h"
 #include "dolphinstatusbar.h"
 #include "dolphinmainwindow.h"
 #include "dolphindirlister.h"
@@ -80,8 +81,8 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow,
     m_topLayout->setMargin(0);
 
     m_urlNavigator = new KUrlNavigator(DolphinSettings::instance().placesModel(), url, this);
     m_topLayout->setMargin(0);
 
     m_urlNavigator = new KUrlNavigator(DolphinSettings::instance().placesModel(), url, this);
-    connect(m_urlNavigator, SIGNAL(urlsDropped(const KUrl::List&, const KUrl&)),
-            m_mainWindow, SLOT(dropUrls(const KUrl::List&, const KUrl&)));
+    connect(m_urlNavigator, SIGNAL(urlsDropped(const KUrl&, QDropEvent*)),
+            this, SLOT(dropUrls(const KUrl&, QDropEvent*)));
     connect(m_urlNavigator, SIGNAL(activated()),
             this, SLOT(activate()));
 
     connect(m_urlNavigator, SIGNAL(activated()),
             this, SLOT(activate()));
 
@@ -406,6 +407,11 @@ void DolphinViewContainer::saveRootUrl(const KUrl& url)
     m_urlNavigator->saveRootUrl(m_view->rootUrl());
 }
 
     m_urlNavigator->saveRootUrl(m_view->rootUrl());
 }
 
+void DolphinViewContainer::dropUrls(const KUrl& destination, QDropEvent* event)
+{
+    DolphinDropController::dropUrls(KFileItem(), destination, event, this);
+}
+
 void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
 {
     KUrl url = item.targetUrl();
 void DolphinViewContainer::slotItemTriggered(const KFileItem& item)
 {
     KUrl url = item.targetUrl();
index b4f799cb1ff6ad7d80eed354ff200763240e0ac2..7c81384d2be019e99c768a2507e11d9206d4eed6 100644 (file)
@@ -201,6 +201,12 @@ private slots:
      * into the URL navigator.
      */
     void saveRootUrl(const KUrl& url);
      * into the URL navigator.
      */
     void saveRootUrl(const KUrl& url);
+    
+    /**
+     * Is connected with the URL navigator and drops the URLs
+     * above the destination \a destination.
+     */
+    void dropUrls(const KUrl& destination, QDropEvent* event);
 
 private:
     /**
 
 private:
     /**
index d349f7b0b27bacf04dc64fe0d45b0787f6c3ff46..6cf2ede18433bc0382e4c6dcebd24baaa890721b 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "treeviewsidebarpage.h"
 
 
 #include "treeviewsidebarpage.h"
 
+#include "dolphindropcontroller.h"
 #include "dolphinmodel.h"
 #include "dolphinsortfilterproxymodel.h"
 #include "dolphinview.h"
 #include "dolphinmodel.h"
 #include "dolphinsortfilterproxymodel.h"
 #include "dolphinview.h"
@@ -210,7 +211,7 @@ void TreeViewSidebarPage::dropUrls(const QModelIndex& index, QDropEvent* event)
         KFileItem item = m_dolphinModel->itemForIndex(dirIndex);
         Q_ASSERT(!item.isNull());
         if (item.isDir()) {
         KFileItem item = m_dolphinModel->itemForIndex(dirIndex);
         Q_ASSERT(!item.isNull());
         if (item.isDir()) {
-            emit urlsDropped(item, item.url(), event);
+            DolphinDropController::dropUrls(item, item.url(), event, this);
         }
     }
 }
         }
     }
 }
index 80db7840b6363e79b6cfbad2ea6ffe40c9f68612..b9f1fba6d10bade43310cb2cef2ca6ca4e58b65f 100644 (file)
@@ -68,12 +68,6 @@ signals:
      */
     void changeSelection(const KFileItemList& selection);
 
      */
     void changeSelection(const KFileItemList& selection);
 
-    /**
-     * This signal is emitted whenever a drop action on this widget needs the
-     * MainWindow's attention.
-     */
-    void urlsDropped(const KFileItem& destItem, const KUrl& destPath, QDropEvent* event);
-
 public slots:
     /**
      * Changes the current selection inside the tree to \a url.
 public slots:
     /**
      * Changes the current selection inside the tree to \a url.