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;
|
SystemEditor *m_systemEditor = nullptr;
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
QAction *m_saveAllAction = nullptr;
|
|
||||||
QAction *m_toggleLeftSideBarAction = nullptr;
|
QAction *m_toggleLeftSideBarAction = nullptr;
|
||||||
QAction *m_toggleRightSideBarAction = nullptr;
|
QAction *m_toggleRightSideBarAction = nullptr;
|
||||||
QAction *m_toggleMenubarAction = nullptr;
|
QAction *m_toggleMenubarAction = nullptr;
|
||||||
QAction *m_cycleModeSelectorStyleAction = nullptr;
|
|
||||||
QAction *m_setModeSelectorStyleIconsAndTextAction = nullptr;
|
QAction *m_setModeSelectorStyleIconsAndTextAction = nullptr;
|
||||||
QAction *m_setModeSelectorStyleHiddenAction = nullptr;
|
QAction *m_setModeSelectorStyleHiddenAction = nullptr;
|
||||||
QAction *m_setModeSelectorStyleIconsOnlyAction = nullptr;
|
QAction *m_setModeSelectorStyleIconsOnlyAction = nullptr;
|
||||||
@@ -2044,9 +2042,9 @@ void ICorePrivate::registerModeSelectorStyleActions()
|
|||||||
ActionContainer *mview = ActionManager::actionContainer(Constants::M_VIEW);
|
ActionContainer *mview = ActionManager::actionContainer(Constants::M_VIEW);
|
||||||
|
|
||||||
// Cycle Mode Selector Styles
|
// Cycle Mode Selector Styles
|
||||||
m_cycleModeSelectorStyleAction = new QAction(Tr::tr("Cycle Mode Selector Styles"), this);
|
ActionBuilder(this, Constants::CYCLE_MODE_SELECTOR_STYLE)
|
||||||
ActionManager::registerAction(m_cycleModeSelectorStyleAction, Constants::CYCLE_MODE_SELECTOR_STYLE);
|
.setText(Tr::tr("Cycle Mode Selector Styles"))
|
||||||
connect(m_cycleModeSelectorStyleAction, &QAction::triggered, this, [this] {
|
.addOnTriggered(this, [this] {
|
||||||
ModeManager::cycleModeStyle();
|
ModeManager::cycleModeStyle();
|
||||||
updateModeSelectorStyleMenu();
|
updateModeSelectorStyleMenu();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user