diff options
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinview.cpp | 2 | ||||
| -rw-r--r-- | src/views/draganddrophelper.cpp | 9 | ||||
| -rw-r--r-- | src/views/draganddrophelper.h | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 455905f6a..7a3903561 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -831,7 +831,7 @@ void DolphinView::slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* even event->buttons(), event->modifiers()); - DragAndDropHelper::dropUrls(destItem, url(), &dropEvent, this); + DragAndDropHelper::dropUrls(destItem, url(), &dropEvent); } void DolphinView::slotModelChanged(KItemModelBase* current, KItemModelBase* previous) 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()); } } diff --git a/src/views/draganddrophelper.h b/src/views/draganddrophelper.h index 85e47077d..d00e11157 100644 --- a/src/views/draganddrophelper.h +++ b/src/views/draganddrophelper.h @@ -41,14 +41,12 @@ public: * @param destItem Item of the destination (can be null, see KFileItem::isNull()). * @param destPath Path of the destination. * @param event Drop event. - * @param widget Source widget where the dragging has been started. * @return Error message if dropping is not possible. If an empty string * is returned, the dropping has been successful. */ static QString dropUrls(const KFileItem& destItem, const KUrl& destPath, - QDropEvent* event, - QWidget* widget); + QDropEvent* event); }; #endif |
