]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Enable dropping of raw data, like one could do in KDE3. It's actually working fine...
authorDavid Faure <faure@kde.org>
Fri, 15 Oct 2010 00:15:13 +0000 (00:15 +0000)
committerDavid Faure <faure@kde.org>
Fri, 15 Oct 2010 00:15:13 +0000 (00:15 +0000)
only image data is still an issue due to bugs in Qt. This will be in KDE 4.6.
CCBUG: 159337

svn path=/trunk/KDE/kdebase/apps/; revision=1186021

src/views/draganddrophelper.cpp

index 0cca59ac4d6d1428b7fbbab49a5af12b7977640e..8ab96d36820e16fe9f3cdbe84d23403b8a66cd4d 100644 (file)
@@ -49,7 +49,10 @@ DragAndDropHelper& DragAndDropHelper::instance()
 
 bool DragAndDropHelper::isMimeDataSupported(const QMimeData* mimeData) const
 {
-    return mimeData->hasUrls() || mimeData->hasFormat("application/x-kde-dndextract");
+    // We support everything, cf KonqOperations::doDrop which can save any data.
+    //return mimeData->hasUrls() || mimeData->hasFormat("application/x-kde-dndextract");
+    Q_UNUSED(mimeData);
+    return true;
 }
 
 void DragAndDropHelper::startDrag(QAbstractItemView* itemView,
@@ -109,9 +112,7 @@ void DragAndDropHelper::dropUrls(const KFileItem& destItem,
     } else {
         const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
         const int urlsCount = urls.count();
-        if (urlsCount == 0) {
-            // TODO: handle dropping of other data
-        } else if ((urlsCount == 1) && (urls.first() == destination)) {
+        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);