Commit c04569a0 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

FancyMainWindow: Disregard accelerators when sorting docks

Change-Id: Ib21a62152008a0b428f93a58d32685e2c0b0dc3b
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent c841dc55
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment