]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Reveal the Backspace shortcut in the UI
authorForest ix <forestix@sonic.net>
Mon, 6 Feb 2023 02:38:55 +0000 (18:38 -0800)
committerMéven Car <meven.car@kdemail.net>
Thu, 9 Feb 2023 11:17:26 +0000 (11:17 +0000)
Since the Back action already has two standard shortcuts, a third one appended
to the list will be invisible in the UI, which shows only the first two.  This
leaves users unable to reassign it.

We therefore make it the first shortcut in the list, so that the hidden third
entry will be the dedicated Back button, which users are far less likely to
want reassigned.

BUG: 371130

src/dolphinmainwindow.cpp

index 1804f34591e91d66ca13ce0005377155f0f27865..4740b66e9d4690b6127ad2c3e177540a2b9971e7 100644 (file)
@@ -1786,7 +1786,8 @@ void DolphinMainWindow::setupActions()
     actionCollection()->addAction(m_backAction->objectName(), m_backAction);
 
     auto backShortcuts = m_backAction->shortcuts();
-    backShortcuts.append(QKeySequence(Qt::Key_Backspace));
+    // Prepend this shortcut, to avoid being hidden by the two-slot UI (#371130)
+    backShortcuts.prepend(QKeySequence(Qt::Key_Backspace));
     actionCollection()->setDefaultShortcuts(m_backAction, backShortcuts);
 
     DolphinRecentTabsMenu *recentTabsMenu = new DolphinRecentTabsMenu(this);