]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphindropcontroller.cpp
Use a QActionGroup and save 6 slots (and the duplication of the action names in the...
[dolphin.git] / src / dolphindropcontroller.cpp
index 6e7ec37ba2ff8dbe81721767e282d93ffade0634..002c242ac8f2cb3eb92775adbdc37514f689b36d 100644 (file)
@@ -50,6 +50,7 @@ void DolphinDropController::dropUrls(const KUrl::List& urls,
     Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
     const bool shiftPressed   = modifier & Qt::ShiftModifier;
     const bool controlPressed = modifier & Qt::ControlModifier;
+    const bool altPressed = modifier & Qt::AltModifier;
     if (shiftPressed && controlPressed) {
         // shortcut for 'Link Here' is used
         action = Qt::LinkAction;
@@ -59,6 +60,9 @@ void DolphinDropController::dropUrls(const KUrl::List& urls,
     } else if (controlPressed) {
         // shortcut for 'Copy Here' is used
         action = Qt::CopyAction;
+    } else if (altPressed) {
+        // shortcut for 'Link Here' is used
+        action = Qt::LinkAction;
     } else {
         // open a context menu which offers the following actions:
         // - Move Here