]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabbar.cpp
Keep working towards a reviewable state
[dolphin.git] / src / dolphintabbar.cpp
index 67a61b0315810ebb2c9d204f5b2df2c74c436827..4c1d9e44ae3a954185531e3111ba636d2fd8b562 100644 (file)
@@ -36,7 +36,13 @@ void DolphinTabBar::dragEnterEvent(QDragEnterEvent* event)
     const int index = tabAt(event->pos());
 
     if (mimeData->hasUrls()) {
-        event->acceptProposedAction();
+        if (index >= 0) {
+            event->acceptProposedAction();
+        } else {
+            event->setDropAction(Qt::IgnoreAction);
+            // Still need to accept it to receive dragMoveEvent
+            event->accept();
+        }
         updateAutoActivationTimer(index);
     }
 
@@ -56,6 +62,11 @@ void DolphinTabBar::dragMoveEvent(QDragMoveEvent* event)
     const int index = tabAt(event->pos());
 
     if (mimeData->hasUrls()) {
+        if (index >= 0) {
+            event->acceptProposedAction();
+        } else {
+            event->setDropAction(Qt::IgnoreAction);
+        }
         updateAutoActivationTimer(index);
     }