diff options
| author | Peter Penz <[email protected]> | 2011-12-06 19:20:48 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-06 19:22:55 +0100 |
| commit | 8998ee8f5163d20a204f2bba8bc240c9bd700be7 (patch) | |
| tree | d102db00e14d148ea9afc03b1a8b135f284fa9aa /src/views/draganddrophelper.cpp | |
| parent | 899c171a2b62f0666dbe2ed755d51a8ae0f7ef9f (diff) | |
Folders Panel cleanups
- Reactivate dropping of URLs
- Remove unused/obsolete code
- Simplify DragAndDropHelper interface
Diffstat (limited to 'src/views/draganddrophelper.cpp')
| -rw-r--r-- | src/views/draganddrophelper.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp index 6cd17b6ba..8e5873480 100644 --- a/src/views/draganddrophelper.cpp +++ b/src/views/draganddrophelper.cpp @@ -24,14 +24,13 @@ #include <KLocale> #include <konq_operations.h> #include <KUrl> +#include <QApplication> #include <QtDBus> #include <QDropEvent> -#include <QWidget> QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destPath, - QDropEvent* event, - QWidget* widget) + QDropEvent* event) { const bool dropToItem = !destItem.isNull() && (destItem.isDir() || destItem.isDesktopFile()); const KUrl destination = dropToItem ? destItem.url() : destPath; @@ -49,9 +48,9 @@ QString DragAndDropHelper::dropUrls(const KFileItem& destItem, if (urlsCount == 1 && urls.first() == destination) { return i18nc("@info:status", "A folder cannot be dropped into itself"); } else if (dropToItem) { - KonqOperations::doDrop(destItem, destination, event, widget); + KonqOperations::doDrop(destItem, destination, event, QApplication::activeWindow()); } else { - KonqOperations::doDrop(KFileItem(), destination, event, widget); + KonqOperations::doDrop(KFileItem(), destination, event, QApplication::activeWindow()); } } |
