]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphindropcontroller.cpp
* adjusted Dolphin to use KonqOperations::doDrop() instead of using a custom implemen...
[dolphin.git] / src / dolphindropcontroller.cpp
index 6d1261d1a78d404ea75a344cfdd998182a3cb2ab..40fccf0d2011cd2c4b9f1aca7a5abb3ad72e7cf6 100644 (file)
 
 #include "dolphindropcontroller.h"
 #include <kfileitem.h>
-#include <klocale.h>
-#include <kicon.h>
-#include <QApplication>
-#include <kdebug.h>
-#include <kmenu.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,
-                                     QDropEvent* event)
+                                     QDropEvent* event,
+                                     QWidget* widget)
 {
     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) {
-            KonqOperations::doDrop(destItem, destination, event, m_parentWidget);
+            KonqOperations::doDrop(destItem, destination, event, widget);
         } 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