Utils: Start replacing SavedActions by QAction or Utils::Aspect

First mechanical step here is to derive SavedActions from BaseAspect
instead of QAction.

Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-10-05 05:27:30 +02:00
parent f4beb6314c
commit fcaa6801cf
20 changed files with 73 additions and 56 deletions

View File

@@ -1197,7 +1197,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
this, &DebuggerPluginPrivate::updateBreakMenuItem);
// Application interaction
connect(action(SettingsDialog), &QAction::triggered,
connect(action(SettingsDialog)->action(), &QAction::triggered,
[] { ICore::showOptionsDialog(DEBUGGER_COMMON_SETTINGS_ID); });
m_perspective.useSubPerspectiveSwitcher(EngineManager::engineChooser());
@@ -2047,7 +2047,7 @@ SavedAction *DebuggerPluginPrivate::action(int code)
QWidget *DebuggerPluginPrivate::addSearch(BaseTreeView *treeView)
{
QAction *act = action(UseAlternatingRowColors);
QAction *act = action(UseAlternatingRowColors)->action();
treeView->setAlternatingRowColors(act->isChecked());
treeView->setProperty(PerspectiveState::savesHeaderKey(), true);
connect(act, &QAction::toggled, treeView, &BaseTreeView::setAlternatingRowColors);