diff options
Diffstat (limited to 'src/panels/places/placespanel.cpp')
| -rw-r--r-- | src/panels/places/placespanel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 2c19d8f29..ba3451bd5 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -156,9 +156,13 @@ void PlacesPanel::dragMoveEvent(QDragMoveEvent *event) // Reject drag ontop of a non-writable protocol // We don't know whether we're dropping inbetween or ontop of a place // so still allow internal drag events so that re-arranging still works. - const QUrl url = placesModel->url(index); - if (url.isValid() && !isInternalDrag(event->mimeData()) && !KProtocolManager::supportsWriting(url)) { - event->setDropAction(Qt::IgnoreAction); + if (!isInternalDrag(event->mimeData())) { + const QUrl url = placesModel->url(index); + if (!url.isValid() || !KProtocolManager::supportsWriting(url)) { + event->setDropAction(Qt::IgnoreAction); + } else { + DragAndDropHelper::updateDropAction(event, url); + } } } |
