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
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@
#include "algorithm.h"
#include "qtcassert.h"
#include "stringutils.h"
#include <QAbstractButton>
#include <QApplication>
......@@ -532,7 +533,7 @@ void FancyMainWindow::addDockActionsToMenu(QMenu *menu)
Utils::sort(actions, [](const QAction *action1, const QAction *action2) {
QTC_ASSERT(action1, return true);
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)
menu->addAction(action);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment