]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphindropcontroller.cpp
Forwardport 773570:
[dolphin.git] / src / dolphindropcontroller.cpp
index 6e7ec37ba2ff8dbe81721767e282d93ffade0634..d322c593d52fbcf2522a112af57a92b7c93c7b8c 100644 (file)
@@ -45,20 +45,23 @@ void DolphinDropController::dropUrls(const KUrl::List& urls,
     kDebug() << "Source" << urls;
     kDebug() << "Destination:" << destination;
 
+    if (destination.protocol() == "trash") {
+        KonqOperations::del(m_parentWidget, KonqOperations::TRASH, urls);
+        return;
+    }
+
     Qt::DropAction action = Qt::CopyAction;
 
     Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
     const bool shiftPressed   = modifier & Qt::ShiftModifier;
     const bool controlPressed = modifier & Qt::ControlModifier;
-    if (shiftPressed && controlPressed) {
-        // shortcut for 'Link Here' is used
+    const bool altPressed = modifier & Qt::AltModifier;
+    if ((shiftPressed && controlPressed) || altPressed) {
         action = Qt::LinkAction;
-    } else if (shiftPressed) {
-        // shortcut for 'Move Here' is used
-        action = Qt::MoveAction;
     } else if (controlPressed) {
-        // shortcut for 'Copy Here' is used
         action = Qt::CopyAction;
+    } else if (shiftPressed) {
+        action = Qt::MoveAction;
     } else {
         // open a context menu which offers the following actions:
         // - Move Here