]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinfileplacesview.cpp
* implement the DragAndDropHelper as singleton derived from QObject, so that emitting...
[dolphin.git] / src / dolphinfileplacesview.cpp
index 4165b90490c71eb31d808f3b339c2143620834b6..df3e6fd878f87df0e87e425784a7878d604e656a 100644 (file)
@@ -18,7 +18,8 @@
  ***************************************************************************/
 
 #include "dolphinfileplacesview.h"
-#include "dolphindropcontroller.h"
+#include "draganddrophelper.h"
+#include <kfileitem.h>
 #include <konq_operations.h>
 
 DolphinFilePlacesView::DolphinFilePlacesView(QWidget* parent) :
@@ -44,13 +45,7 @@ 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);
+    DragAndDropHelper::instance().dropUrls(KFileItem(), dest, event, parent);
 }
 
 void DolphinFilePlacesView::emitExtendedUrlChangedSignal(const KUrl& url)