From: Peter Penz Date: Sat, 6 Dec 2008 17:47:35 +0000 (+0000) Subject: show a "Copy Here" and "Link Here" action, when a file is dragged within the same... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/05cc6c2f4d9b8804c1e460e3765e27543847e72d show a "Copy Here" and "Link Here" action, when a file is dragged within the same folder BUG: 164314 svn path=/trunk/KDE/kdebase/apps/; revision=893493 --- diff --git a/src/draganddrophelper.cpp b/src/draganddrophelper.cpp index ff319dfb8..387448deb 100644 --- a/src/draganddrophelper.cpp +++ b/src/draganddrophelper.cpp @@ -101,24 +101,8 @@ void DragAndDropHelper::dropUrls(const KFileItem& destItem, QDBusConnection::sessionBus().call(message); } else { const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); - const KUrl source = urls.first(); - const KUrl sourceDir = KUrl(source.directory()); - const bool singleSelection = (urls.count() == 1); - - if (singleSelection && (source == destination)) { + if ((urls.count() == 1) && (urls.first() == destination)) { emit errorMessage(i18nc("@info:status", "A folder cannot be dropped into itself")); - } else if (sourceDir == destination) { - QString msg; - if (singleSelection) { - msg = i18nc("@info:status", - "The dropped item %1 is already inside " - "the folder %2", source.fileName(), destination.fileName()); - } else { - msg = i18nc("@info:status", - "The dropped items are already inside the folder %1", - destination.fileName()); - } - emit errorMessage(msg); } else if (dropToItem) { KonqOperations::doDrop(destItem, destination, event, widget); } else {