┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/draganddrophelper.cpp
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2013-01-09 15:16:30 +0100
committerEmmanuel Pescosta <[email protected]>2013-01-09 15:16:30 +0100
commit804d8119b3e9afeb900d54814d665f820cb79adb (patch)
tree44881bd18152cd93cd528aabf22449fdacb9f67b /src/views/draganddrophelper.cpp
parent9f9cd60d1ca0c3a41a0d7ebaeb453917cddcf13e (diff)
Fix Bug 233335 - Wrong icons selected after pasting files and renaming them (because there exists items with it's names
Fixed the "same" buggy behavior when dropping files/folders Select also putted files (PUT operation - SimpleJob) - e.g. Paste content from clipboard BUG: 233335 REVIEW: 107351
Diffstat (limited to 'src/views/draganddrophelper.cpp')
-rw-r--r--src/views/draganddrophelper.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp
index f81d4d0bf..f8ae0ad03 100644
--- a/src/views/draganddrophelper.cpp
+++ b/src/views/draganddrophelper.cpp
@@ -28,10 +28,13 @@
#include <QtDBus>
#include <QDropEvent>
-QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destUrl, QDropEvent* event)
+KonqOperations* DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destUrl, QDropEvent* event, QString& error)
{
+ error.clear();
+
if (!destItem.isNull() && !destItem.isWritable()) {
- return i18nc("@info:status", "Access denied. Could not write to <filename>%1</filename>", destUrl.pathOrUrl());
+ error = i18nc("@info:status", "Access denied. Could not write to <filename>%1</filename>", destUrl.pathOrUrl());
+ return 0;
}
const QMimeData* mimeData = event->mimeData();
@@ -49,15 +52,16 @@ QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destU
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
foreach (const KUrl& url, urls) {
if (url == destUrl) {
- return i18nc("@info:status", "A folder cannot be dropped into itself");
+ error = i18nc("@info:status", "A folder cannot be dropped into itself");
+ return 0;
}
}
- KonqOperations::doDrop(destItem, destUrl, event, QApplication::activeWindow());
+ return KonqOperations::doDrop(destItem, destUrl, event, QApplication::activeWindow(), QList<QAction*>());
} else {
- KonqOperations::doDrop(KFileItem(), destUrl, event, QApplication::activeWindow());
+ return KonqOperations::doDrop(KFileItem(), destUrl, event, QApplication::activeWindow(), QList<QAction*>());
}
- return QString();
+ return 0;
}