diff options
author | hjk <[email protected]> | 2023-06-26 11:02:42 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2023-06-29 11:25:44 +0000 |
commit | 379e7f906e6f1dd8656364f5a2cf4feed2127d0f (patch) | |
tree | 05a457b51212749f5e0622cf79c93b88b8bb8966 /src/plugins/debugger/console | |
parent | 900ea82fd1a4a629768b71abaf9117f90b7fd951 (diff) |
Utils: Rework aspect implementation
This avoids some repetition and could be a step towards
having type storage in (or rather accessible from) the base,
so we can have aspects for more complex data (treemodels...)
that are not easily converted to QVariant.
Change-Id: I9797b3d5646195705212db1830d2b415291ac651
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger/console')
-rw-r--r-- | src/plugins/debugger/console/console.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/debugger/console/console.cpp b/src/plugins/debugger/console/console.cpp index b1c3767f0e9..57810ef62bf 100644 --- a/src/plugins/debugger/console/console.cpp +++ b/src/plugins/debugger/console/console.cpp @@ -87,8 +87,8 @@ Console::Console() m_showDebug.setToolTip(Tr::tr("Show debug, log, and info messages.")); m_showDebug.setValue(true); m_showDebug.action()->setIcon(Utils::Icons::INFO_TOOLBAR.icon()); - connect(&m_showDebug, &Utils::BoolAspect::valueChanged, - proxyModel, &ConsoleProxyModel::setShowLogs); + connect(&m_showDebug, &Utils::BoolAspect::changed, + proxyModel, [this, proxyModel] { proxyModel->setShowLogs(m_showDebug()); }); m_showDebugButton->setDefaultAction(m_showDebug.action()); m_showWarningButton = new QToolButton(m_consoleWidget); @@ -100,7 +100,7 @@ Console::Console() m_showWarning.setValue(true); m_showWarning.action()->setIcon(Utils::Icons::WARNING_TOOLBAR.icon()); connect(m_showWarning.action(), &QAction::toggled, - proxyModel, &ConsoleProxyModel::setShowWarnings); + proxyModel, [this, proxyModel] { proxyModel->setShowWarnings(m_showWarning()); }); m_showWarningButton->setDefaultAction(m_showWarning.action()); m_showErrorButton = new QToolButton(m_consoleWidget); @@ -112,7 +112,7 @@ Console::Console() m_showError.setValue(true); m_showError.action()->setIcon(Utils::Icons::CRITICAL_TOOLBAR.icon()); connect(m_showError.action(), &QAction::toggled, - proxyModel, &ConsoleProxyModel::setShowErrors); + proxyModel, [this, proxyModel] { proxyModel->setShowErrors(m_showError()); }); m_showErrorButton->setDefaultAction(m_showError.action()); m_spacer = new QWidget(m_consoleWidget); |