]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphiniconsview.cpp
dolphin can use soprano, but nowhere in apps we look for it; so search for Soprano...
[dolphin.git] / src / dolphiniconsview.cpp
index a45b08dcf9886b27d7235c07900798ebca0468c6..de0aaec97c1ed7391982a236efa4a117d3eb95f6 100644 (file)
@@ -229,8 +229,15 @@ void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event)
         const KFileItem item = itemForIndex(index);
         if (!item.isNull() && item.isDir()) {
             m_dropRect = visualRect(index);
+        } else {
+            m_dropRect.setSize(QSize()); // set as invalid
         }
     }
+    if (event->mimeData()->hasUrls()) {
+        // accept url drops, independently from the destination item
+        event->acceptProposedAction();
+    }
+
     setDirtyRegion(m_dropRect);
 }
 
@@ -260,7 +267,7 @@ void DolphinIconsView::paintEvent(QPaintEvent* event)
     // TODO: remove this code when the issue #160611 is solved in Qt 4.4
     if (m_dragging) {
         const QBrush& brush = viewOptions().palette.brush(QPalette::Normal, QPalette::Highlight);
-        DragAndDropHelper::drawHoverIndication(viewport(), m_dropRect, brush);
+        DragAndDropHelper::drawHoverIndication(this, m_dropRect, brush);
     }
 }