aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/aggregation/examples/text/main.cpp2
-rw-r--r--src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp3
-rw-r--r--src/libs/utils/savedaction.cpp2
-rw-r--r--src/plugins/beautifier/uncrustify/uncrustifysettings.cpp3
-rw-r--r--src/plugins/cmakeprojectmanager/cmakekitinformation.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/servermode.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/tealeafreader.cpp2
-rw-r--r--src/plugins/cpptools/clangdiagnosticconfigsselectionwidget.cpp6
-rw-r--r--src/plugins/debugger/breakhandler.cpp2
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp2
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp2
-rw-r--r--src/plugins/debugger/debuggerrunconfigurationaspect.cpp2
-rw-r--r--src/plugins/debugger/enginemanager.cpp2
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp2
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp2
-rw-r--r--src/plugins/help/generalsettingspage.cpp4
-rw-r--r--src/plugins/imageviewer/exportdialog.cpp6
-rw-r--r--src/plugins/ios/createsimulatordialog.cpp2
-rw-r--r--src/plugins/ios/iosbuildconfiguration.cpp2
-rw-r--r--src/plugins/ios/iosrunconfiguration.cpp2
-rw-r--r--src/plugins/nim/project/nimcompilerbuildstepconfigwidget.cpp4
-rw-r--r--src/plugins/nim/suggest/server.cpp8
-rw-r--r--src/plugins/perfprofiler/perfconfigwidget.cpp3
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp2
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp2
-rw-r--r--src/plugins/qmldesigner/components/componentcore/zoomaction.cpp2
-rw-r--r--src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp2
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importswidget.cpp2
-rw-r--r--src/plugins/qmldesigner/components/integration/componentaction.cpp2
-rw-r--r--src/plugins/qnx/qnxsettingswidget.cpp2
-rw-r--r--src/plugins/qtsupport/gettingstartedwelcomepage.cpp2
-rw-r--r--src/plugins/texteditor/completionsettingspage.cpp3
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp2
-rw-r--r--tests/auto/valgrind/callgrind/modeltest.cpp2
34 files changed, 42 insertions, 50 deletions
diff --git a/src/libs/aggregation/examples/text/main.cpp b/src/libs/aggregation/examples/text/main.cpp
index c205ccb8383..043196ab786 100644
--- a/src/libs/aggregation/examples/text/main.cpp
+++ b/src/libs/aggregation/examples/text/main.cpp
@@ -31,7 +31,7 @@ MyMain::MyMain(QWidget *parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
ui.setupUi(this);
- connect(ui.comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(ui.comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &MyMain::select);
}
diff --git a/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp b/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp
index c8f03ea8d9c..8e1deea7158 100644
--- a/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp
+++ b/src/libs/qt-breakpad/qtcrashhandler/dumpsender.cpp
@@ -145,8 +145,7 @@ void DumpSender::sendDumpAndQuit()
connect(reply, &QNetworkReply::uploadProgress, this, &DumpSender::uploadProgress);
connect(reply, &QNetworkReply::finished, QCoreApplication::instance(), &QCoreApplication::quit);
- connect(reply,
- static_cast<void (QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error),
+ connect(reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error),
QCoreApplication::instance(), &QCoreApplication::quit);
}
diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp
index 0000e54d317..87a785f6db7 100644
--- a/src/libs/utils/savedaction.cpp
+++ b/src/libs/utils/savedaction.cpp
@@ -235,7 +235,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
} else if (auto spinBox = qobject_cast<QSpinBox *>(widget)) {
spinBox->setValue(m_value.toInt());
if (applyMode == ImmediateApply) {
- connect(spinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ connect(spinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, [this, spinBox]() { setValue(spinBox->value()); });
}
} else if (auto lineEdit = qobject_cast<QLineEdit *>(widget)) {
diff --git a/src/plugins/beautifier/uncrustify/uncrustifysettings.cpp b/src/plugins/beautifier/uncrustify/uncrustifysettings.cpp
index a9c5760ce3d..7d7954ceb71 100644
--- a/src/plugins/beautifier/uncrustify/uncrustifysettings.cpp
+++ b/src/plugins/beautifier/uncrustify/uncrustifysettings.cpp
@@ -56,8 +56,7 @@ const char FORMAT_ENTIRE_FILE_FALLBACK[] = "formatEntireFileFallback";
UncrustifySettings::UncrustifySettings() :
AbstractSettings(Constants::Uncrustify::SETTINGS_NAME, ".cfg")
{
- connect(&m_versionProcess,
- static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
+ connect(&m_versionProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &UncrustifySettings::parseVersionProcessResult);
setCommand("uncrustify");
diff --git a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
index 823d4711023..efe0dccc578 100644
--- a/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakekitinformation.cpp
@@ -87,7 +87,7 @@ public:
updateComboBox();
refresh();
- connect(m_comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &CMakeKitAspectWidget::currentCMakeToolChanged);
m_manageButton->setContentsMargins(0, 0, 0, 0);
diff --git a/src/plugins/cmakeprojectmanager/servermode.cpp b/src/plugins/cmakeprojectmanager/servermode.cpp
index e9a0e3ad0c9..58f2afbc224 100644
--- a/src/plugins/cmakeprojectmanager/servermode.cpp
+++ b/src/plugins/cmakeprojectmanager/servermode.cpp
@@ -118,7 +118,7 @@ ServerMode::ServerMode(const Environment &env,
connect(m_cmakeProcess.get(), &QtcProcess::started, this, [this]() { m_connectionTimer.start(); });
connect(m_cmakeProcess.get(),
- static_cast<void(QtcProcess::*)(int, QProcess::ExitStatus)>(&QtcProcess::finished),
+ QOverload<int, QProcess::ExitStatus>::of(&QtcProcess::finished),
this, &ServerMode::handleCMakeFinished);
QString argumentString;
@@ -211,7 +211,7 @@ void ServerMode::connectToServer()
auto socket = new QLocalSocket(m_cmakeProcess.get());
connect(socket, &QLocalSocket::readyRead, this, &ServerMode::handleRawCMakeServerData);
- connect(socket, static_cast<void(QLocalSocket::*)(QLocalSocket::LocalSocketError)>(&QLocalSocket::error),
+ connect(socket, QOverload<QLocalSocket::LocalSocketError>::of(&QLocalSocket::error),
this, [this, socket]() {
reportError(socket->errorString());
m_cmakeSocket = nullptr;
diff --git a/src/plugins/cmakeprojectmanager/tealeafreader.cpp b/src/plugins/cmakeprojectmanager/tealeafreader.cpp
index f1cd1ddd7ab..8192c63b91f 100644
--- a/src/plugins/cmakeprojectmanager/tealeafreader.cpp
+++ b/src/plugins/cmakeprojectmanager/tealeafreader.cpp
@@ -498,7 +498,7 @@ void TeaLeafReader::startCMake(const QStringList &configurationArguments)
this, &TeaLeafReader::processCMakeOutput);
connect(m_cmakeProcess, &QProcess::readyReadStandardError,
this, &TeaLeafReader::processCMakeError);
- connect(m_cmakeProcess, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
+ connect(m_cmakeProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &TeaLeafReader::cmakeFinished);
QString args;
diff --git a/src/plugins/cpptools/clangdiagnosticconfigsselectionwidget.cpp b/src/plugins/cpptools/clangdiagnosticconfigsselectionwidget.cpp
index eb89d7d87e8..7899fcae4cd 100644
--- a/src/plugins/cpptools/clangdiagnosticconfigsselectionwidget.cpp
+++ b/src/plugins/cpptools/clangdiagnosticconfigsselectionwidget.cpp
@@ -68,10 +68,8 @@ Core::Id ClangDiagnosticConfigsSelectionWidget::currentConfigId() const
void ClangDiagnosticConfigsSelectionWidget::connectToCurrentIndexChanged()
{
m_currentIndexChangedConnection
- = connect(m_selectionComboBox,
- static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
- this,
- [this]() { emit currentConfigChanged(currentConfigId()); });
+ = connect(m_selectionComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, [this]() { emit currentConfigChanged(currentConfigId()); });
}
void ClangDiagnosticConfigsSelectionWidget::disconnectFromCurrentIndexChanged()
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 0e015eda581..2fd197c618e 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -541,7 +541,7 @@ BreakpointDialog::BreakpointDialog(unsigned int enabledParts, QWidget *parent)
verticalLayout->addWidget(m_buttonBox);
verticalLayout->setStretchFactor(groupBoxAdvanced, 10);
- connect(m_comboBoxType, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_comboBoxType, QOverload<int>::of(&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/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index b740520ea0d..6c6e5de61a2 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -203,7 +203,7 @@ CdbEngine::CdbEngine() :
connect(action(CreateFullBacktrace), &QAction::triggered,
this, &CdbEngine::createFullBacktrace);
- connect(&m_process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
+ connect(&m_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &CdbEngine::processFinished);
connect(&m_process, &QProcess::errorOccurred, this, &CdbEngine::processError);
connect(&m_process, &QProcess::readyReadStandardOutput,
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 4024ceb8ae8..329f11a81b1 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -326,7 +326,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, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(d->historyComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &StartApplicationDialog::historyIndexChanged);
connect(d->channelOverrideEdit, &QLineEdit::textChanged,
diff --git a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
index 30428364eda..161c755d101 100644
--- a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
+++ b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
@@ -121,7 +121,7 @@ DebuggerRunConfigWidget::DebuggerRunConfigWidget(DebuggerRunConfigurationAspect
this, &DebuggerRunConfigWidget::useQmlDebuggerClicked);
connect(m_useCppDebugger, &QAbstractButton::clicked,
this, &DebuggerRunConfigWidget::useCppDebuggerClicked);
- connect(m_debugServerPort, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
+ connect(m_debugServerPort, QOverload<int>::of(&QSpinBox::valueChanged),
this, &DebuggerRunConfigWidget::qmlDebugServerPortChanged);
connect(m_useMultiProcess, &QAbstractButton::toggled,
this, &DebuggerRunConfigWidget::useMultiProcessToggled);
diff --git a/src/plugins/debugger/enginemanager.cpp b/src/plugins/debugger/enginemanager.cpp
index 9e81ff2ed2a..6050dc50b94 100644
--- a/src/plugins/debugger/enginemanager.cpp
+++ b/src/plugins/debugger/enginemanager.cpp
@@ -145,7 +145,7 @@ public:
if (hideSwitcherUnlessNeeded)
m_engineChooser->hide();
- connect(m_engineChooser, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_engineChooser, QOverload<int>::of(&QComboBox::activated),
this, &EngineManagerPrivate::activateEngineByIndex);
}
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index f422225d452..39acf7df96c 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -118,7 +118,7 @@ void PdbEngine::setupEngine()
QString bridge = ICore::resourcePath() + "/debugger/pdbbridge.py";
connect(&m_proc, &QProcess::errorOccurred, this, &PdbEngine::handlePdbError);
- connect(&m_proc, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
+ connect(&m_proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
this, &PdbEngine::handlePdbFinished);
connect(&m_proc, &QProcess::readyReadStandardOutput,
this, &PdbEngine::readPdbStandardOutput);
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 1807efb910c..bb73e18141b 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -245,7 +245,7 @@ public:
connect(&m_timerUpdate, &QTimer::timeout,
this, &RelativeNumbersColumn::followEditorLayout);
- auto start = static_cast<void(QTimer::*)()>(&QTimer::start);
+ auto start = QOverload<>::of(&QTimer::start);
connect(m_editor, &QPlainTextEdit::cursorPositionChanged,
&m_timerUpdate, start);
connect(m_editor->verticalScrollBar(), &QAbstractSlider::valueChanged,
diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp
index 39033b7bff8..3b3e3668585 100644
--- a/src/plugins/help/generalsettingspage.cpp
+++ b/src/plugins/help/generalsettingspage.cpp
@@ -81,14 +81,14 @@ QWidget *GeneralSettingsPage::widget()
updateFont(); // changes that might have happened when updating the selectors
});
- connect(m_ui->styleComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_ui->styleComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, [this]() {
updateFont();
updateFontSizeSelector();
updateFont(); // changes that might have happened when updating the selectors
});
- connect(m_ui->sizeComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_ui->sizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &GeneralSettingsPage::updateFont);
m_homePage = LocalHelpManager::homePage();
diff --git a/src/plugins/imageviewer/exportdialog.cpp b/src/plugins/imageviewer/exportdialog.cpp
index f0ac5a694e8..682a7dfd30f 100644
--- a/src/plugins/imageviewer/exportdialog.cpp
+++ b/src/plugins/imageviewer/exportdialog.cpp
@@ -88,8 +88,6 @@ ExportDialog::ExportDialog(QWidget *parent)
, m_heightSpinBox(new QSpinBox(this))
, m_aspectRatio(1)
{
- using QSpinBoxIntSignal = void (QSpinBox::*)(int);
-
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto formLayout = new QFormLayout(this);
@@ -102,14 +100,14 @@ ExportDialog::ExportDialog(QWidget *parent)
auto sizeLayout = new QHBoxLayout;
m_widthSpinBox->setMinimum(exportMinimumSize);
m_widthSpinBox->setMaximum(exportMaximumSize);
- connect(m_widthSpinBox, static_cast<QSpinBoxIntSignal>(&QSpinBox::valueChanged),
+ connect(m_widthSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, &ExportDialog::exportWidthChanged);
sizeLayout->addWidget(m_widthSpinBox);
//: Multiplication, as in 32x32
sizeLayout->addWidget(new QLabel(tr("x")));
m_heightSpinBox->setMinimum(exportMinimumSize);
m_heightSpinBox->setMaximum(exportMaximumSize);
- connect(m_heightSpinBox, static_cast<QSpinBoxIntSignal>(&QSpinBox::valueChanged),
+ connect(m_heightSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, &ExportDialog::exportHeightChanged);
sizeLayout->addWidget(m_heightSpinBox);
auto resetButton = new QToolButton(this);
diff --git a/src/plugins/ios/createsimulatordialog.cpp b/src/plugins/ios/createsimulatordialog.cpp
index 6c8d711b684..1bfcc25f71e 100644
--- a/src/plugins/ios/createsimulatordialog.cpp
+++ b/src/plugins/ios/createsimulatordialog.cpp
@@ -53,7 +53,7 @@ CreateSimulatorDialog::CreateSimulatorDialog(QWidget *parent) :
m_ui->runtimeCombo->currentIndex() > 0);
};
- const auto indexChanged = static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged);
+ const auto indexChanged = QOverload<int>::of(&QComboBox::currentIndexChanged);
connect(m_ui->nameEdit, &QLineEdit::textChanged, enableOk);
connect(m_ui->runtimeCombo, indexChanged, enableOk);
connect(m_ui->deviceTypeCombo, indexChanged, [this, enableOk]() {
diff --git a/src/plugins/ios/iosbuildconfiguration.cpp b/src/plugins/ios/iosbuildconfiguration.cpp
index 533d29f45c9..0ef0002071c 100644
--- a/src/plugins/ios/iosbuildconfiguration.cpp
+++ b/src/plugins/ios/iosbuildconfiguration.cpp
@@ -171,7 +171,7 @@ IosBuildSettingsWidget::IosBuildSettingsWidget(IosBuildConfiguration *bc)
if (m_isDevice) {
connect(IosConfigurations::instance(), &IosConfigurations::provisioningDataChanged,
this, &IosBuildSettingsWidget::populateDevelopmentTeams);
- connect(m_signEntityCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_signEntityCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &IosBuildSettingsWidget::onSigningEntityComboIndexChanged);
connect(m_autoSignCheckbox, &QCheckBox::toggled,
this, &IosBuildSettingsWidget::configureSigningUi);
diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp
index e0c5b629a69..db732fe9533 100644
--- a/src/plugins/ios/iosrunconfiguration.cpp
+++ b/src/plugins/ios/iosrunconfiguration.cpp
@@ -332,7 +332,7 @@ void IosDeviceTypeAspect::addToConfigurationLayout(QFormLayout *layout)
updateValues();
- connect(m_deviceTypeComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_deviceTypeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &IosDeviceTypeAspect::setDeviceTypeIndex);
}
diff --git a/src/plugins/nim/project/nimcompilerbuildstepconfigwidget.cpp b/src/plugins/nim/project/nimcompilerbuildstepconfigwidget.cpp
index be16d37a5bc..27acf217260 100644
--- a/src/plugins/nim/project/nimcompilerbuildstepconfigwidget.cpp
+++ b/src/plugins/nim/project/nimcompilerbuildstepconfigwidget.cpp
@@ -60,11 +60,11 @@ NimCompilerBuildStepConfigWidget::NimCompilerBuildStepConfigWidget(NimCompilerBu
this, &NimCompilerBuildStepConfigWidget::updateUi);
// Connect UI signals
- connect(m_ui->targetComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_ui->targetComboBox, QOverload<int>::of(&QComboBox::activated),
this, &NimCompilerBuildStepConfigWidget::onTargetChanged);
connect(m_ui->additionalArgumentsLineEdit, &QLineEdit::textEdited,
this, &NimCompilerBuildStepConfigWidget::onAdditionalArgumentsTextEdited);
- connect(m_ui->defaultArgumentsComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_ui->defaultArgumentsComboBox, QOverload<int>::of(&QComboBox::activated),
this, &NimCompilerBuildStepConfigWidget::onDefaultArgumentsComboBoxIndexChanged);
updateUi();
diff --git a/src/plugins/nim/suggest/server.cpp b/src/plugins/nim/suggest/server.cpp
index 862513f1088..8e9b79b827c 100644
--- a/src/plugins/nim/suggest/server.cpp
+++ b/src/plugins/nim/suggest/server.cpp
@@ -30,8 +30,8 @@ namespace Suggest {
NimSuggestServer::NimSuggestServer(QObject *parent) : QObject(parent)
{
- connect(&m_process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>
- (&QProcess::finished), this, &NimSuggestServer::onFinished);
+ connect(&m_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
+ this, &NimSuggestServer::onFinished);
connect(&m_process, &QProcess::started, this, &NimSuggestServer::onStarted);
connect(&m_process, &QProcess::readyReadStandardOutput, this,
&NimSuggestServer::onStandardOutputAvailable);
@@ -69,8 +69,8 @@ bool NimSuggestServer::start(const QString &executablePath,
void NimSuggestServer::kill()
{
- disconnect(&m_process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>
- (&QProcess::finished), this, &NimSuggestServer::onFinished);
+ disconnect(&m_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
+ this, &NimSuggestServer::onFinished);
m_process.kill();
m_process.waitForFinished();
clearState();
diff --git a/src/plugins/perfprofiler/perfconfigwidget.cpp b/src/plugins/perfprofiler/perfconfigwidget.cpp
index 5134ee4f6e9..1fe3acf58d9 100644
--- a/src/plugins/perfprofiler/perfconfigwidget.cpp
+++ b/src/plugins/perfprofiler/perfconfigwidget.cpp
@@ -76,8 +76,7 @@ PerfConfigWidget::PerfConfigWidget(PerfSettings *settings, QWidget *parent) :
m_ui->sampleMode->addItem(tr("frequency (Hz)"), QLatin1String(Constants::PerfSampleFrequency));
m_ui->sampleMode->addItem(tr("event count"), QLatin1String(Constants::PerfSampleCount));
- auto comboboxChangedSignal
- = static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged);
+ auto comboboxChangedSignal = QOverload<int>::of(&QComboBox::currentIndexChanged);
connect(m_ui->callgraphMode, comboboxChangedSignal, this, [this](int index) {
QString mode = m_ui->callgraphMode->itemData(index).toString();
m_settings->setCallgraphMode(mode);
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
index b04ec95efc0..835f3a0429a 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
@@ -1007,7 +1007,7 @@ void ComboBoxField::setup(JsonFieldPage *page, const QString &name)
// the selectionModel does not behave like expected and wanted - so we block signals here
// (for example there was some losing focus thing when hovering over items, ...)
selectionModel()->blockSignals(true);
- QObject::connect(w, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated), [w, this](int index) {
+ QObject::connect(w, QOverload<int>::of(&QComboBox::activated), [w, this](int index) {
w->blockSignals(true);
selectionModel()->clearSelection();
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index 394a63290a1..065de1e7151 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -376,7 +376,7 @@ public:
m_projectSelection = new QComboBox;
m_projectSelection->setModel(&m_comboBoxModel);
- connect(m_projectSelection, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_projectSelection, QOverload<int>::of(&QComboBox::activated),
this, &ProjectWindowPrivate::projectSelected, Qt::QueuedConnection);
SessionManager *sessionManager = SessionManager::instance();
diff --git a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp
index 30ee8a4a350..40ad483785f 100644
--- a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp
+++ b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp
@@ -104,7 +104,7 @@ QWidget *ZoomAction::createWidget(QWidget *parent)
comboBox->setCurrentIndex(m_currentComboBoxIndex);
blockSignals(false);
});
- connect(comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
[this, comboBox](int index) {
m_currentComboBoxIndex = index;
diff --git a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp
index 0ce0a995bab..27bfbe4f838 100644
--- a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp
@@ -59,7 +59,7 @@ QWidget *NumberSeriesAction::createWidget(QWidget *parent)
comboBox->setModel(m_comboBoxModel.data());
comboBox->setCurrentIndex(m_comboBoxModelIndex);
- connect(comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &NumberSeriesAction::emitValueChanged);
return comboBox;
diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp
index 0d2218a42ba..07ada7c8588 100644
--- a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp
+++ b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp
@@ -39,7 +39,7 @@ ImportsWidget::ImportsWidget(QWidget *parent) :
{
setWindowTitle(tr("Import Manager"));
m_addImportComboBox = new ImportManagerComboBox(this);
- connect(m_addImportComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_addImportComboBox, QOverload<int>::of(&QComboBox::activated),
this, &ImportsWidget::addSelectedImport);
}
diff --git a/src/plugins/qmldesigner/components/integration/componentaction.cpp b/src/plugins/qmldesigner/components/integration/componentaction.cpp
index daedbe8d7dd..c3c6875d63e 100644
--- a/src/plugins/qmldesigner/components/integration/componentaction.cpp
+++ b/src/plugins/qmldesigner/components/integration/componentaction.cpp
@@ -53,7 +53,7 @@ QWidget *ComponentAction::createWidget(QWidget *parent)
comboBox->setToolTip(tr("Edit sub components defined in this file."));
comboBox->setModel(m_componentView->standardItemModel());
comboBox->setCurrentIndex(-1);
- connect(comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(comboBox, QOverload<int>::of(&QComboBox::activated),
this, &ComponentAction::emitCurrentComponentChanged);
connect(this, &ComponentAction::currentIndexChanged, comboBox, &QComboBox::setCurrentIndex);
diff --git a/src/plugins/qnx/qnxsettingswidget.cpp b/src/plugins/qnx/qnxsettingswidget.cpp
index ae2950b926c..cafc639ce7b 100644
--- a/src/plugins/qnx/qnxsettingswidget.cpp
+++ b/src/plugins/qnx/qnxsettingswidget.cpp
@@ -49,7 +49,7 @@ QnxSettingsWidget::QnxSettingsWidget(QWidget *parent) :
this, &QnxSettingsWidget::addConfiguration);
connect(m_ui->removeButton, &QAbstractButton::clicked,
this, &QnxSettingsWidget::removeConfiguration);
- connect(m_ui->configsCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_ui->configsCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &QnxSettingsWidget::updateInformation);
connect(m_ui->generateKitsCheckBox, &QAbstractButton::toggled,
this, &QnxSettingsWidget::generateKits);
diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
index c80cbf44c6a..fdc594866eb 100644
--- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
+++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp
@@ -644,7 +644,7 @@ public:
ExampleSetModel *exampleSetModel = m_examplesModel->exampleSetModel();
exampleSetSelector->setModel(exampleSetModel);
exampleSetSelector->setCurrentIndex(exampleSetModel->selectedExampleSet());
- connect(exampleSetSelector, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
+ connect(exampleSetSelector, QOverload<int>::of(&QComboBox::activated),
exampleSetModel, &ExampleSetModel::selectExampleSet);
connect(exampleSetModel, &ExampleSetModel::selectedExampleSetChanged,
exampleSetSelector, &QComboBox::setCurrentIndex);
diff --git a/src/plugins/texteditor/completionsettingspage.cpp b/src/plugins/texteditor/completionsettingspage.cpp
index b9cff7f661a..6c5253ebc62 100644
--- a/src/plugins/texteditor/completionsettingspage.cpp
+++ b/src/plugins/texteditor/completionsettingspage.cpp
@@ -60,8 +60,7 @@ QWidget *CompletionSettingsPage::widget()
m_page = new Ui::CompletionSettingsPage;
m_page->setupUi(m_widget);
- connect(m_page->completionTrigger,
- static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ connect(m_page->completionTrigger, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &CompletionSettingsPage::onCompletionTriggerChanged);
int caseSensitivityIndex = 0;
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index 355d755521a..0bf4b2661e1 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -509,7 +509,7 @@ CallgrindToolPrivate::CallgrindToolPrivate()
m_searchFilter = new QLineEdit;
m_searchFilter->setPlaceholderText(CallgrindTool::tr("Filter..."));
connect(m_searchFilter, &QLineEdit::textChanged,
- &m_updateTimer, static_cast<void(QTimer::*)()>(&QTimer::start));
+ &m_updateTimer, QOverload<>::of(&QTimer::start));
setCostFormat(settings->costFormat());
enableCycleDetection(settings->detectCycles());
diff --git a/tests/auto/valgrind/callgrind/modeltest.cpp b/tests/auto/valgrind/callgrind/modeltest.cpp
index c02b23bf6d6..6197f632d6d 100644
--- a/tests/auto/valgrind/callgrind/modeltest.cpp
+++ b/tests/auto/valgrind/callgrind/modeltest.cpp
@@ -85,7 +85,7 @@ ModelTestWidget::ModelTestWidget(CallgrindWidgetHandler *handler)
m_format->addItem("absolute", CostDelegate::FormatAbsolute);
m_format->addItem("relative", CostDelegate::FormatRelative);
m_format->addItem("rel. to parent", CostDelegate::FormatRelativeToParent);
- connect(m_format, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
+ connect(m_format, QOverload<int>::of(&QComboBox::activated),
this, &ModelTestWidget::formatChanged);
h->addWidget(m_format);