mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
When dropping an Amarok file into Dolphin, mimeData->hasUrls() returns true although the number of URLs is 0. I'll have to do further investigations to fix this in a clean way, but in the meantime this patch prevents opening an error dialog box.
CCBUG: 176580 svn path=/trunk/KDE/kdebase/apps/; revision=896517
This commit is contained in:
parent
7fbc814147
commit
44d2f43a40
1 changed files with 4 additions and 1 deletions
|
@ -101,7 +101,10 @@ void DragAndDropHelper::dropUrls(const KFileItem& destItem,
|
|||
QDBusConnection::sessionBus().call(message);
|
||||
} else {
|
||||
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
|
||||
if ((urls.count() == 1) && (urls.first() == destination)) {
|
||||
const int urlsCount = urls.count();
|
||||
if (urlsCount == 0) {
|
||||
// TODO: handle dropping of other data
|
||||
} else if ((urlsCount == 1) && (urls.first() == destination)) {
|
||||
emit errorMessage(i18nc("@info:status", "A folder cannot be dropped into itself"));
|
||||
} else if (dropToItem) {
|
||||
KonqOperations::doDrop(destItem, destination, event, widget);
|
||||
|
|
Loading…
Reference in a new issue