diff --git a/src/libs/qmldebug/qmldebugconnectionmanager.cpp b/src/libs/qmldebug/qmldebugconnectionmanager.cpp index 173bbb2d970..0a3b9633ea8 100644 --- a/src/libs/qmldebug/qmldebugconnectionmanager.cpp +++ b/src/libs/qmldebug/qmldebugconnectionmanager.cpp @@ -120,7 +120,7 @@ void QmlDebugConnectionManager::connectToTcpServer() void QmlDebugConnectionManager::startLocalServer() { stopConnectionTimer(); - connect(&m_connectionTimer, &QTimer::timeout, this, [this]() { + connect(&m_connectionTimer, &QTimer::timeout, this, [this] { QTC_ASSERT(!isConnected(), return); // We leave the server running as some application might currently be trying to diff --git a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp index 10fc42058c1..e36fe6ac60e 100644 --- a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp @@ -73,7 +73,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) : connect(parentContextWidget->colorDialog(), &CustomColorDialog::rejected, this, &ContextPaneTextWidget::onColorDialogCancled); - connect(ui->fontSizeSpinBox, QOverload::of(&QmlEditorWidgets::FontSizeSpinBox::valueChanged), + connect(ui->fontSizeSpinBox, &QmlEditorWidgets::FontSizeSpinBox::valueChanged, this, &ContextPaneTextWidget::onFontSizeChanged); connect(ui->fontSizeSpinBox, &QmlEditorWidgets::FontSizeSpinBox::formatChanged, this, &ContextPaneTextWidget::onFontFormatChanged); @@ -103,7 +103,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) : connect(ui->bottomAlignmentButton, &QToolButton::toggled, this, &ContextPaneTextWidget::onVerticalAlignmentChanged); - connect(ui->styleComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(ui->styleComboBox, &QComboBox::currentIndexChanged, this, &ContextPaneTextWidget::onStyleComboBoxChanged); } diff --git a/src/libs/qmleditorwidgets/customcolordialog.cpp b/src/libs/qmleditorwidgets/customcolordialog.cpp index a133c7844be..b912f1be5dc 100644 --- a/src/libs/qmleditorwidgets/customcolordialog.cpp +++ b/src/libs/qmleditorwidgets/customcolordialog.cpp @@ -112,13 +112,13 @@ CustomColorDialog::CustomColorDialog(QWidget *parent) : QFrame(parent ) resize(sizeHint()); connect(m_colorBox, &ColorBox::colorChanged, this, &CustomColorDialog::onColorBoxChanged); - connect(m_alphaSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(m_alphaSpinBox, &QDoubleSpinBox::valueChanged, this, &CustomColorDialog::spinBoxChanged); - connect(m_rSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(m_rSpinBox, &QDoubleSpinBox::valueChanged, this, &CustomColorDialog::spinBoxChanged); - connect(m_gSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(m_gSpinBox, &QDoubleSpinBox::valueChanged, this, &CustomColorDialog::spinBoxChanged); - connect(m_bSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(m_bSpinBox, &QDoubleSpinBox::valueChanged, this, &CustomColorDialog::spinBoxChanged); connect(m_hueControl, &HueControl::hueChanged, this, &CustomColorDialog::onHueChanged); diff --git a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp index 4f33198dab7..35ae39d0746 100644 --- a/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp +++ b/src/libs/qmleditorwidgets/easingpane/easingcontextpane.cpp @@ -132,17 +132,17 @@ EasingContextPane::EasingContextPane(QWidget *parent) : connect(m_simulation, &EasingSimulation::finished, this, &EasingContextPane::switchToGraph); connect(ui->playButton, &QPushButton::clicked, this, &EasingContextPane::playClicked); - connect(ui->overshootSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(ui->overshootSpinBox, &QDoubleSpinBox::valueChanged, this, &EasingContextPane::overshootChanged); - connect(ui->periodSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(ui->periodSpinBox, &QDoubleSpinBox::valueChanged, this, &EasingContextPane::periodChanged); - connect(ui->amplitudeSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + connect(ui->amplitudeSpinBox, &QDoubleSpinBox::valueChanged, this, &EasingContextPane::amplitudeChanged); - connect(ui->easingExtremesComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(ui->easingExtremesComboBox, &QComboBox::currentIndexChanged, this, &EasingContextPane::easingExtremesChanged); - connect(ui->easingShapeComboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(ui->easingShapeComboBox, &QComboBox::currentIndexChanged, this, &EasingContextPane::easingShapeChanged); - connect(ui->durationSpinBox, QOverload::of(&QSpinBox::valueChanged), + connect(ui->durationSpinBox, &QSpinBox::valueChanged, this, &EasingContextPane::durationChanged); } diff --git a/src/libs/qmljs/parser/qmljslexer.cpp b/src/libs/qmljs/parser/qmljslexer.cpp index 6c4eb70744d..212f894c76a 100644 --- a/src/libs/qmljs/parser/qmljslexer.cpp +++ b/src/libs/qmljs/parser/qmljslexer.cpp @@ -492,7 +492,7 @@ again: // handle comment can be called after a '/' has been read // and returns true if it actually encountered a comment - auto handleComment = [this](){ + auto handleComment = [this] { if (_char == u'*') { scanChar(); while (_codePtr <= _endPtr) { diff --git a/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp b/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp index f18c6a54763..bf5241f7eec 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/actioneditordialog.cpp @@ -49,23 +49,23 @@ ActionEditorDialog::ActionEditorDialog(QWidget *parent) { setupUIComponents(); - QObject::connect(m_comboBoxType, QOverload::of(&QComboBox::activated), + QObject::connect(m_comboBoxType, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::Type); }); // Action connections - QObject::connect(m_actionTargetItem, QOverload::of(&QComboBox::activated), + QObject::connect(m_actionTargetItem, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetItem); }); - QObject::connect(m_actionMethod, QOverload::of(&QComboBox::activated), + QObject::connect(m_actionMethod, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetProperty); }); // Assignment connections - QObject::connect(m_assignmentTargetItem, QOverload::of(&QComboBox::activated), + QObject::connect(m_assignmentTargetItem, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetItem); }); - QObject::connect(m_assignmentTargetProperty, QOverload::of(&QComboBox::activated), + QObject::connect(m_assignmentTargetProperty, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetProperty); }); - QObject::connect(m_assignmentSourceItem, QOverload::of(&QComboBox::activated), + QObject::connect(m_assignmentSourceItem, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::SourceItem); }); - QObject::connect(m_assignmentSourceProperty, QOverload::of(&QComboBox::activated), + QObject::connect(m_assignmentSourceProperty, &QComboBox::activated, [this] (int idx) { this->updateComboBoxes(idx, ComboBox::SourceProperty); }); } diff --git a/src/plugins/qmldesigner/components/bindingeditor/bindingeditordialog.cpp b/src/plugins/qmldesigner/components/bindingeditor/bindingeditordialog.cpp index 3ca83321de8..30afa3629ff 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/bindingeditordialog.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/bindingeditordialog.cpp @@ -47,11 +47,11 @@ BindingEditorDialog::BindingEditorDialog(QWidget *parent) { setupUIComponents(); - QObject::connect(m_comboBoxItem, QOverload::of(&QComboBox::currentIndexChanged), + QObject::connect(m_comboBoxItem, &QComboBox::currentIndexChanged, this, &BindingEditorDialog::itemIDChanged); - QObject::connect(m_comboBoxProperty, QOverload::of(&QComboBox::currentIndexChanged), + QObject::connect(m_comboBoxProperty, &QComboBox::currentIndexChanged, this, &BindingEditorDialog::propertyIDChanged); - QObject::connect(m_checkBoxNot, QOverload::of(&QCheckBox::stateChanged), + QObject::connect(m_checkBoxNot, &QCheckBox::stateChanged, this, &BindingEditorDialog::checkBoxChanged); } diff --git a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp index af4f6edac82..850093286fa 100644 --- a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp @@ -136,8 +136,7 @@ QWidget *ZoomAction::createWidget(QWidget *parent) m_combo->setCurrentIndex(indexOf(1.0)); m_combo->setToolTip(m_combo->currentText()); - auto currentChanged = QOverload::of(&QComboBox::currentIndexChanged); - connect(m_combo, currentChanged, this, &ZoomAction::emitZoomLevelChanged); + connect(m_combo, &QComboBox::currentIndexChanged, this, &ZoomAction::emitZoomLevelChanged); return m_combo.data(); } diff --git a/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp b/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp index a46cd9cb8a9..df8ba039910 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp @@ -178,7 +178,7 @@ QWidget *BindingDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt default: qWarning() << "BindingDelegate::createEditor column" << index.column(); } - connect(bindingComboBox, QOverload::of(&QComboBox::activated), this, [=]() { + connect(bindingComboBox, &QComboBox::activated, this, [=] { auto delegate = const_cast(this); emit delegate->commitData(bindingComboBox); }); @@ -225,7 +225,7 @@ QWidget *DynamicPropertiesDelegate::createEditor(QWidget *parent, const QStyleOp case DynamicPropertiesModel::PropertyTypeRow: { auto dynamicPropertiesComboBox = new PropertiesComboBox(parent); - connect(dynamicPropertiesComboBox, QOverload::of(&QComboBox::activated), this, [=]() { + connect(dynamicPropertiesComboBox, &QComboBox::activated, this, [=] { auto delegate = const_cast(this); emit delegate->commitData(dynamicPropertiesComboBox); }); @@ -386,7 +386,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const QStyleOptionVie default: qWarning() << "ConnectionDelegate::createEditor column" << index.column(); } - connect(connectionComboBox, QOverload::of(&QComboBox::activated), this, [=]() { + connect(connectionComboBox, &QComboBox::activated, this, [=] { auto delegate = const_cast(this); emit delegate->commitData(connectionComboBox); }); @@ -413,7 +413,7 @@ QWidget *BackendDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt case BackendModel::TypeNameColumn: { auto backendComboBox = new PropertiesComboBox(parent); backendComboBox->addItems(model->possibleCppTypes()); - connect(backendComboBox, QOverload::of(&QComboBox::activated), this, [=]() { + connect(backendComboBox, &QComboBox::activated, this, [=] { auto delegate = const_cast(this); emit delegate->commitData(backendComboBox); }); diff --git a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp index b7bbf370511..ebae6e79590 100644 --- a/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp +++ b/src/plugins/qmldesigner/components/curveeditor/curveeditortoolbar.cpp @@ -101,13 +101,9 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent) m_startSpin->setRange(std::numeric_limits::lowest(), std::numeric_limits::max()); m_startSpin->setValue(model->minimumTime()); - connect( - m_startSpin, QOverload::of(&QSpinBox::valueChanged), - this, &CurveEditorToolBar::startFrameChanged); - - connect( - model, &CurveEditorModel::commitStartFrame, - [this](int frame) { m_startSpin->setValue(frame); }); + connect(m_startSpin, &QSpinBox::valueChanged, this, &CurveEditorToolBar::startFrameChanged); + connect(model, &CurveEditorModel::commitStartFrame, + this, [this](int frame) { m_startSpin->setValue(frame); }); auto validateEnd = [this](int val) -> bool { if (m_startSpin==nullptr) @@ -118,20 +114,14 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent) m_endSpin->setRange(std::numeric_limits::lowest(), std::numeric_limits::max()); m_endSpin->setValue(model->maximumTime()); - connect( - m_endSpin, QOverload::of(&QSpinBox::valueChanged), - this, &CurveEditorToolBar::endFrameChanged); - - connect( - model, &CurveEditorModel::commitEndFrame, - [this](int frame) { m_endSpin->setValue(frame); }); + connect(m_endSpin, &QSpinBox::valueChanged, this, &CurveEditorToolBar::endFrameChanged); + connect(model, &CurveEditorModel::commitEndFrame, + this, [this](int frame) { m_endSpin->setValue(frame); }); m_currentSpin->setMinimum(0); m_currentSpin->setMaximum(std::numeric_limits::max()); - connect( - m_currentSpin, QOverload::of(&QSpinBox::valueChanged), - this, &CurveEditorToolBar::currentFrameChanged); + connect(m_currentSpin, &QSpinBox::valueChanged, this, &CurveEditorToolBar::currentFrameChanged); auto *durationBox = new QHBoxLayout; durationBox->addWidget(new QLabel(tr("Start Frame"))); diff --git a/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp b/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp index 7fc3b27f6c7..fbcdf2dbbbe 100644 --- a/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp +++ b/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp @@ -71,7 +71,7 @@ QWidget *BackgroundAction::createWidget(QWidget *parent) } comboBox->setCurrentIndex(0); - connect(comboBox, QOverload::of(&QComboBox::currentIndexChanged), + connect(comboBox, &QComboBox::currentIndexChanged, this, &BackgroundAction::emitBackgroundChanged); comboBox->setProperty("hideborder", true); diff --git a/src/plugins/qmldesigner/components/integration/componentaction.cpp b/src/plugins/qmldesigner/components/integration/componentaction.cpp index c3c6875d63e..4884e870d8c 100644 --- a/src/plugins/qmldesigner/components/integration/componentaction.cpp +++ b/src/plugins/qmldesigner/components/integration/componentaction.cpp @@ -53,8 +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, QOverload::of(&QComboBox::activated), - this, &ComponentAction::emitCurrentComponentChanged); + connect(comboBox, &QComboBox::activated, this, &ComponentAction::emitCurrentComponentChanged); connect(this, &ComponentAction::currentIndexChanged, comboBox, &QComboBox::setCurrentIndex); return comboBox; diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp index dc29dab8c1b..898743859bd 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimportdialog.cpp @@ -565,8 +565,8 @@ QGridLayout *ItemLibraryAssetImportDialog::createOptionsGrid( optSpin->setMinimumWidth(controlMinWidth); optControl = optSpin; if (advanced) { - QObject::connect(optSpin, QOverload::of(&QDoubleSpinBox::valueChanged), this, - [this, optSpin, optKey, optionsIndex]() { + QObject::connect(optSpin, &QDoubleSpinBox::valueChanged, this, + [this, optSpin, optKey, optionsIndex] { QJsonObject optObj = m_importOptions[optionsIndex].value(optKey).toObject(); QJsonValue value(optSpin->value()); optObj.insert("value", value); @@ -577,13 +577,13 @@ QGridLayout *ItemLibraryAssetImportDialog::createOptionsGrid( m_labelToControlWidgetMaps[optionsIndex].value(optKey)); if (advSpin) { // Connect corresponding advanced control - QObject::connect(optSpin, QOverload::of(&QDoubleSpinBox::valueChanged), - this, [optSpin, advSpin]() { + QObject::connect(optSpin, &QDoubleSpinBox::valueChanged, + this, [optSpin, advSpin] { if (advSpin->value() != optSpin->value()) advSpin->setValue(optSpin->value()); }); - QObject::connect(advSpin, QOverload::of(&QDoubleSpinBox::valueChanged), - this, [optSpin, advSpin]() { + QObject::connect(advSpin, &QDoubleSpinBox::valueChanged, + this, [optSpin, advSpin] { if (advSpin->value() != optSpin->value()) optSpin->setValue(advSpin->value()); }); @@ -675,9 +675,8 @@ QGridLayout *ItemLibraryAssetImportDialog::createOptionsGrid( w2->setEnabled(enable); }; enableConditionally(optSpin, conLabel, conControl, mode); - QObject::connect( - optSpin, QOverload::of(&QDoubleSpinBox::valueChanged), - optSpin, [optSpin, conLabel, conControl, mode, enableConditionally]() { + QObject::connect(optSpin, &QDoubleSpinBox::valueChanged, optSpin, + [optSpin, conLabel, conControl, mode, enableConditionally] { enableConditionally(optSpin, conLabel, conControl, mode); }); } diff --git a/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp b/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp index 88d78615ca7..0adfdb8de3a 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/canvasstyledialog.cpp @@ -100,25 +100,21 @@ CanvasStyleDialog::CanvasStyleDialog(const CanvasStyle &style, QWidget *parent) emit styleChanged(out); }; - auto doubleValueChanged = QOverload::of( - &QDoubleSpinBox::valueChanged); - auto colorValueChanged = &ColorControl::valueChanged; + connect(m_aspect, &QDoubleSpinBox::valueChanged, this, emitValueChanged); - connect(m_aspect, doubleValueChanged, this, emitValueChanged); + connect(m_thinLineWidth, &QDoubleSpinBox::valueChanged, this, emitValueChanged); + connect(m_thickLineWidth, &QDoubleSpinBox::valueChanged, this, emitValueChanged); - connect(m_thinLineWidth, doubleValueChanged, this, emitValueChanged); - connect(m_thickLineWidth, doubleValueChanged, this, emitValueChanged); + connect(m_thinLineColor, &ColorControl::valueChanged, this, emitValueChanged); + connect(m_thickLineColor, &ColorControl::valueChanged, this, emitValueChanged); - connect(m_thinLineColor, colorValueChanged, this, emitValueChanged); - connect(m_thickLineColor, colorValueChanged, this, emitValueChanged); + connect(m_handleSize, &QDoubleSpinBox::valueChanged, this, emitValueChanged); + connect(m_handleLineWidth, &QDoubleSpinBox::valueChanged, this, emitValueChanged); - connect(m_handleSize, doubleValueChanged, this, emitValueChanged); - connect(m_handleLineWidth, doubleValueChanged, this, emitValueChanged); + connect(m_endPointColor, &ColorControl::valueChanged, this, emitValueChanged); + connect(m_interPointColor, &ColorControl::valueChanged, this, emitValueChanged); - connect(m_endPointColor, colorValueChanged, this, emitValueChanged); - connect(m_interPointColor, colorValueChanged, this, emitValueChanged); - - connect(m_curveWidth, doubleValueChanged, this, emitValueChanged); + connect(m_curveWidth, &QDoubleSpinBox::valueChanged, this, emitValueChanged); } } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/timelineeditor/easingcurvedialog.cpp b/src/plugins/qmldesigner/components/timelineeditor/easingcurvedialog.cpp index 99e97d72de8..c7c6f7dd755 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/easingcurvedialog.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/easingcurvedialog.cpp @@ -138,18 +138,10 @@ EasingCurveDialog::EasingCurveDialog(const QList &frames, QWidget *pa mainBox->addWidget(tabWidget); setLayout(mainBox); - connect(m_splineEditor, - &SplineEditor::easingCurveChanged, - this, - &EasingCurveDialog::updateEasingCurve); - + connect(m_splineEditor, &SplineEditor::easingCurveChanged, + this, &EasingCurveDialog::updateEasingCurve); connect(m_presets, &PresetEditor::presetChanged, m_splineEditor, &SplineEditor::setEasingCurve); - - connect(durationEdit, - QOverload::of(&QSpinBox::valueChanged), - m_splineEditor, - &SplineEditor::setDuration); - + connect(durationEdit, &QSpinBox::valueChanged, m_splineEditor, &SplineEditor::setDuration); connect(animateButton, &QPushButton::clicked, m_splineEditor, &SplineEditor::animate); m_presets->initialize(presetBar); diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineanimationform.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineanimationform.cpp index 1797ae9bff4..83999c22bba 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineanimationform.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineanimationform.cpp @@ -56,11 +56,11 @@ TimelineAnimationForm::TimelineAnimationForm(QWidget *parent) connectSpinBox(ui->startFrame, "from"); connectSpinBox(ui->endFrame, "to"); - connect(ui->loops, QOverload::of(&QSpinBox::valueChanged), [this]() { + connect(ui->loops, &QSpinBox::valueChanged, this, [this] { ui->continuous->setChecked(ui->loops->value() == -1); }); - connect(ui->continuous, &QCheckBox::toggled, [this](bool checked) { + connect(ui->continuous, &QCheckBox::toggled, this, [this](bool checked) { if (checked) { setProperty("loops", -1); ui->loops->setValue(-1); @@ -70,7 +70,7 @@ TimelineAnimationForm::TimelineAnimationForm(QWidget *parent) } }); - connect(ui->idLineEdit, &QLineEdit::editingFinished, [this]() { + connect(ui->idLineEdit, &QLineEdit::editingFinished, this, [this] { QTC_ASSERT(m_timeline.isValid(), return ); static QString lastString; @@ -105,7 +105,7 @@ TimelineAnimationForm::TimelineAnimationForm(QWidget *parent) } }); - connect(ui->running, &QCheckBox::clicked, [this](bool checked) { + connect(ui->running, &QCheckBox::clicked, this, [this](bool checked) { if (checked) { setProperty("running", true); } else { @@ -113,7 +113,7 @@ TimelineAnimationForm::TimelineAnimationForm(QWidget *parent) } }); - connect(ui->pingPong, &QCheckBox::clicked, [this](bool checked) { + connect(ui->pingPong, &QCheckBox::clicked, this, [this](bool checked) { if (checked) { setProperty("pingPong", true); } else { @@ -121,9 +121,7 @@ TimelineAnimationForm::TimelineAnimationForm(QWidget *parent) } }); - connect(ui->transitionToState, - QOverload::of(&QComboBox::activated), - [this](int index) { + connect(ui->transitionToState, &QComboBox::activated, this, [this](int index) { if (!m_animation.isValid()) return; if (!m_animation.view()->rootModelNode().hasId()) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp index 5b636592db3..d93c1a66ec5 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesettingsmodel.cpp @@ -148,7 +148,7 @@ QWidget *TimelineEditorDelegate::createEditor(QWidget *parent, } if (comboBox) { - connect(comboBox, QOverload::of(&QComboBox::activated), this, [=]() { + connect(comboBox, &QComboBox::activated, this, [=] { auto delegate = const_cast(this); emit delegate->commitData(comboBox); }); diff --git a/src/plugins/qmldesigner/designercore/instances/qprocessuniqueptr.h b/src/plugins/qmldesigner/designercore/instances/qprocessuniqueptr.h index 9274f916b83..b7c47e13606 100644 --- a/src/plugins/qmldesigner/designercore/instances/qprocessuniqueptr.h +++ b/src/plugins/qmldesigner/designercore/instances/qprocessuniqueptr.h @@ -37,10 +37,7 @@ public: void operator()(QProcess *process) { process->disconnect(); - QObject::connect(process, - QOverload::of(&QProcess::finished), - process, - &QProcess::deleteLater); + QObject::connect(process, &QProcess::finished, process, &QProcess::deleteLater); process->kill(); } }; diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 7a4ef38d8e0..0a7c1027fb2 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -427,10 +427,8 @@ void DesignModeWidget::setup() workspaceComboBox->setCurrentText(m_dockManager->activeWorkspace()); }); connect(m_dockManager, &ADS::DockManager::workspaceLoaded, workspaceComboBox, &QComboBox::setCurrentText); - connect(workspaceComboBox, - QOverload::of(&QComboBox::activated), - m_dockManager, - [this, workspaceComboBox]([[maybe_unused]] int index) { + connect(workspaceComboBox, &QComboBox::activated, + m_dockManager, [this, workspaceComboBox]([[maybe_unused]] int index) { m_dockManager->openWorkspace(workspaceComboBox->currentText()); }); diff --git a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp index d3252ea8e3e..829a834fd0a 100644 --- a/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp +++ b/src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp @@ -269,7 +269,7 @@ QWidget *SwitchLanguageComboboxAction::createWidget(QWidget *parent) refreshComboBoxFunction(project); // do this after refreshComboBoxFunction so we do not get currentLocaleChanged signals at initialization - connect(comboBox, QOverload::of(&QComboBox::currentIndexChanged), [this, comboBox](int index) { + connect(comboBox, &QComboBox::currentIndexChanged, [this, comboBox](int index) { if (index == 0) // == Default emit currentLocaleChanged(""); else diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp index 41aff0b86b5..9572b4e40e5 100644 --- a/src/plugins/qmljseditor/qmljseditor.cpp +++ b/src/plugins/qmljseditor/qmljseditor.cpp @@ -571,7 +571,7 @@ void QmlJSEditorWidget::createToolBar() policy.setHorizontalPolicy(QSizePolicy::Expanding); m_outlineCombo->setSizePolicy(policy); - connect(m_outlineCombo, QOverload::of(&QComboBox::activated), + connect(m_outlineCombo, &QComboBox::activated, this, &QmlJSEditorWidget::jumpToOutlineElement); connect(m_qmlJsEditorDocument->outlineModel(), &Internal::QmlOutlineModel::updated, static_cast(m_outlineCombo->view()), &QTreeView::expandAll); diff --git a/src/plugins/qmljstools/qmljscodestylesettingswidget.cpp b/src/plugins/qmljstools/qmljscodestylesettingswidget.cpp index 7cb7eb2dc50..7211d617e78 100644 --- a/src/plugins/qmljstools/qmljscodestylesettingswidget.cpp +++ b/src/plugins/qmljstools/qmljscodestylesettingswidget.cpp @@ -38,8 +38,7 @@ QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent) : { ui->setupUi(this); - auto spinValueChanged = QOverload::of(&QSpinBox::valueChanged); - connect(ui->lineLengthSpinBox, spinValueChanged, + connect(ui->lineLengthSpinBox, &QSpinBox::valueChanged, this, &QmlJSCodeStyleSettingsWidget::slotSettingsChanged); } diff --git a/src/plugins/qmlprojectmanager/qmlmainfileaspect.cpp b/src/plugins/qmlprojectmanager/qmlmainfileaspect.cpp index 9eaeaddd4c9..8a52a6b63cc 100644 --- a/src/plugins/qmlprojectmanager/qmlmainfileaspect.cpp +++ b/src/plugins/qmlprojectmanager/qmlmainfileaspect.cpp @@ -85,8 +85,7 @@ void QmlMainFileAspect::addToLayout(LayoutBuilder &builder) connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::fileListChanged, this, &QmlMainFileAspect::updateFileComboBox); - connect(m_fileListCombo, QOverload::of(&QComboBox::activated), - this, &QmlMainFileAspect::setMainScript); + connect(m_fileListCombo, &QComboBox::activated, this, &QmlMainFileAspect::setMainScript); builder.addItems({tr("Main QML file:"), m_fileListCombo.data()}); }