From 1b070bcb114982cb8390adc06d9ce953a212f146 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 19 Jul 2022 23:23:34 +0200 Subject: [PATCH] Drop Qt5: Debugger: Get rid of QOverload Change-Id: Ic62a3173adeffdfa78a47849cf1ceaa4f59b8091 Reviewed-by: hjk Reviewed-by: Qt CI Bot --- src/plugins/debugger/analyzer/analyzerrunconfigwidget.cpp | 4 +--- src/plugins/debugger/breakhandler.cpp | 3 +-- src/plugins/debugger/debuggerdialogs.cpp | 2 +- src/plugins/debugger/debuggerkitinformation.cpp | 2 +- src/plugins/debugger/debuggermainwindow.cpp | 2 +- src/plugins/debugger/enginemanager.cpp | 2 +- src/plugins/debugger/qml/qmlengine.cpp | 2 +- src/plugins/debugger/shared/symbolpathsdialog.cpp | 4 ++-- src/plugins/debugger/stackwindow.cpp | 3 +-- src/plugins/debugger/threadshandler.cpp | 2 +- src/plugins/debugger/watchhandler.cpp | 4 ++-- 11 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/plugins/debugger/analyzer/analyzerrunconfigwidget.cpp b/src/plugins/debugger/analyzer/analyzerrunconfigwidget.cpp index ef0cfa19203..02a2769404c 100644 --- a/src/plugins/debugger/analyzer/analyzerrunconfigwidget.cpp +++ b/src/plugins/debugger/analyzer/analyzerrunconfigwidget.cpp @@ -80,9 +80,7 @@ AnalyzerRunConfigWidget::AnalyzerRunConfigWidget(ProjectExplorer::GlobalOrProjec chooseSettings(aspect->isUsingGlobalSettings() ? 0 : 1); - connect(settingsCombo, QOverload::of(&QComboBox::activated), - this, chooseSettings); - + connect(settingsCombo, &QComboBox::activated, this, chooseSettings); connect(restoreButton, &QPushButton::clicked, aspect, &ProjectExplorer::GlobalOrProjectAspect::resetProjectToGlobalSettings); } diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 1b95ae1eb94..6912c9d0824 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -542,8 +542,7 @@ BreakpointDialog::BreakpointDialog(unsigned int enabledParts, QWidget *parent) verticalLayout->addWidget(m_buttonBox); verticalLayout->setStretchFactor(groupBoxAdvanced, 10); - connect(m_comboBoxType, QOverload::of(&QComboBox::activated), - this, &BreakpointDialog::typeChanged); + connect(m_comboBoxType, &QComboBox::activated, this, &BreakpointDialog::typeChanged); connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); } diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index a5dbec79dd3..fb8da55b553 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -329,7 +329,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent) this, &StartApplicationDialog::updateState); connect(d->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(d->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); - connect(d->historyComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(d->historyComboBox, &QComboBox::currentIndexChanged, this, &StartApplicationDialog::historyIndexChanged); connect(d->channelOverrideEdit, &QLineEdit::textChanged, diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 7315e015db9..87821effb44 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -68,7 +68,7 @@ public: refresh(); m_comboBox->setToolTip(ki->description()); - connect(m_comboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(m_comboBox, &QComboBox::currentIndexChanged, this, &DebuggerKitAspectWidget::currentDebuggerChanged); m_manageButton = createManageButton(ProjectExplorer::Constants::DEBUGGER_SETTINGS_PAGE_ID); diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index 267321527eb..483c678e255 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -192,7 +192,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent) m_perspectiveChooser->setObjectName("PerspectiveChooser"); m_perspectiveChooser->setProperty("panelwidget", true); m_perspectiveChooser->setSizeAdjustPolicy(QComboBox::AdjustToContents); - connect(m_perspectiveChooser, QOverload::of(&QComboBox::activated), this, [this](int item) { + connect(m_perspectiveChooser, &QComboBox::activated, this, [this](int item) { Perspective *perspective = Perspective::findPerspective(m_perspectiveChooser->itemData(item).toString()); QTC_ASSERT(perspective, return); if (auto subPerspective = Perspective::findPerspective(perspective->d->m_lastActiveSubPerspectiveId)) diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp index b11e6ac756a..a12d7577508 100644 --- a/src/plugins/debugger/enginemanager.cpp +++ b/src/plugins/debugger/enginemanager.cpp @@ -143,7 +143,7 @@ public: if (hideSwitcherUnlessNeeded) m_engineChooser->hide(); - connect(m_engineChooser, QOverload::of(&QComboBox::activated), + connect(m_engineChooser, &QComboBox::activated, this, &EngineManagerPrivate::activateEngineByIndex); } diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index fccc458fd62..6b8d17fedd0 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -2438,7 +2438,7 @@ void QmlEnginePrivate::stateChanged(State state) BreakpointManager::claimBreakpointsForEngine(engine); // Since the breakpoint claiming is deferred, we need to also defer the connecting - QTimer::singleShot(0, this, [this]() { + QTimer::singleShot(0, this, [this] { /// Start session. flushSendBuffer(); QJsonObject parameters; diff --git a/src/plugins/debugger/shared/symbolpathsdialog.cpp b/src/plugins/debugger/shared/symbolpathsdialog.cpp index 26156ee5c50..42d87293197 100644 --- a/src/plugins/debugger/shared/symbolpathsdialog.cpp +++ b/src/plugins/debugger/shared/symbolpathsdialog.cpp @@ -69,8 +69,8 @@ SymbolPathsDialog::SymbolPathsDialog(QWidget *parent) : buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); - connect(buttonBox, &QDialogButtonBox::accepted, this, qOverload<>(&QDialog::accept)); - connect(buttonBox, &QDialogButtonBox::rejected, this, qOverload<>(&QDialog::reject)); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); auto horizontalLayout = new QHBoxLayout(); horizontalLayout->addWidget(m_pixmapLabel); diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index 4c8c9cce711..2a25aa96ee5 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -45,8 +45,7 @@ void StackTreeView::setModel(QAbstractItemModel *model) if (model) setRootIndex(model->index(0, 0, QModelIndex())); - connect(static_cast(model), &StackHandler::stackChanged, - this, [this]() { + connect(static_cast(model), &StackHandler::stackChanged, this, [this] { if (!m_contentsAdjusted) adjustForContents(); }); diff --git a/src/plugins/debugger/threadshandler.cpp b/src/plugins/debugger/threadshandler.cpp index d2155712e6d..7928e75d47f 100644 --- a/src/plugins/debugger/threadshandler.cpp +++ b/src/plugins/debugger/threadshandler.cpp @@ -359,7 +359,7 @@ QPointer ThreadsHandler::threadSwitcher() m_comboBox = new QComboBox; m_comboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); m_comboBox->setModel(this); - connect(m_comboBox, QOverload::of(&QComboBox::activated), this, [this](int row) { + connect(m_comboBox, &QComboBox::activated, this, [this](int row) { setData(index(row, 0), {}, BaseTreeView::ItemActivatedRole); }); } diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 21a1c2c2048..157835c2607 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -1978,7 +1978,7 @@ QMenu *WatchModel::createFormatMenu(WatchItem *item, QWidget *parent) }); } - addAction(this, menu, Tr::tr("Reset All Individual Formats"), true, [this]() { + addAction(this, menu, Tr::tr("Reset All Individual Formats"), true, [this] { theIndividualFormats.clear(); saveFormats(); m_engine->updateLocals(); @@ -2004,7 +2004,7 @@ QMenu *WatchModel::createFormatMenu(WatchItem *item, QWidget *parent) }); } - addAction(this, menu, Tr::tr("Reset All Formats for Types"), true, [this]() { + addAction(this, menu, Tr::tr("Reset All Formats for Types"), true, [this] { theTypeFormats.clear(); saveFormats(); m_engine->updateLocals();