forked from qt-creator/qt-creator
Core: Simplify Cycle Mode Selector Styles action setup
... and remove unused m_saveAllAction member. Change-Id: If6ebb448b68c5ed776b9ed7eda872321723cc48f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -322,11 +322,9 @@ public:
|
||||
SystemEditor *m_systemEditor = nullptr;
|
||||
|
||||
// actions
|
||||
QAction *m_saveAllAction = nullptr;
|
||||
QAction *m_toggleLeftSideBarAction = nullptr;
|
||||
QAction *m_toggleRightSideBarAction = nullptr;
|
||||
QAction *m_toggleMenubarAction = nullptr;
|
||||
QAction *m_cycleModeSelectorStyleAction = nullptr;
|
||||
QAction *m_setModeSelectorStyleIconsAndTextAction = nullptr;
|
||||
QAction *m_setModeSelectorStyleHiddenAction = nullptr;
|
||||
QAction *m_setModeSelectorStyleIconsOnlyAction = nullptr;
|
||||
@@ -2044,9 +2042,9 @@ void ICorePrivate::registerModeSelectorStyleActions()
|
||||
ActionContainer *mview = ActionManager::actionContainer(Constants::M_VIEW);
|
||||
|
||||
// Cycle Mode Selector Styles
|
||||
m_cycleModeSelectorStyleAction = new QAction(Tr::tr("Cycle Mode Selector Styles"), this);
|
||||
ActionManager::registerAction(m_cycleModeSelectorStyleAction, Constants::CYCLE_MODE_SELECTOR_STYLE);
|
||||
connect(m_cycleModeSelectorStyleAction, &QAction::triggered, this, [this] {
|
||||
ActionBuilder(this, Constants::CYCLE_MODE_SELECTOR_STYLE)
|
||||
.setText(Tr::tr("Cycle Mode Selector Styles"))
|
||||
.addOnTriggered(this, [this] {
|
||||
ModeManager::cycleModeStyle();
|
||||
updateModeSelectorStyleMenu();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user