Skip to content
Snippets Groups Projects
Commit c04569a0 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

FancyMainWindow: Disregard accelerators when sorting docks


Change-Id: Ib21a62152008a0b428f93a58d32685e2c0b0dc3b
Reviewed-by: default avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent c841dc55
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "algorithm.h" #include "algorithm.h"
#include "qtcassert.h" #include "qtcassert.h"
#include "stringutils.h"
#include <QAbstractButton> #include <QAbstractButton>
#include <QApplication> #include <QApplication>
...@@ -532,7 +533,7 @@ void FancyMainWindow::addDockActionsToMenu(QMenu *menu) ...@@ -532,7 +533,7 @@ void FancyMainWindow::addDockActionsToMenu(QMenu *menu)
Utils::sort(actions, [](const QAction *action1, const QAction *action2) { Utils::sort(actions, [](const QAction *action1, const QAction *action2) {
QTC_ASSERT(action1, return true); QTC_ASSERT(action1, return true);
QTC_ASSERT(action2, return false); QTC_ASSERT(action2, return false);
return action1->text().toLower() < action2->text().toLower(); return stripAccelerator(action1->text()).toLower() < stripAccelerator(action2->text()).toLower();
}); });
foreach (QAction *action, actions) foreach (QAction *action, actions)
menu->addAction(action); menu->addAction(action);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment