Drop Qt5: Qml lib / QmlDesigner: Get rid of QOverload

Add a context object into some lambdas.

Change-Id: I16ee7a0c061483e4d90c9e015852c41a4f3cde90
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-07-20 00:35:01 +02:00
parent 683ad910b8
commit ad35f08498
23 changed files with 73 additions and 107 deletions

View File

@@ -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

View File

@@ -73,7 +73,7 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) :
connect(parentContextWidget->colorDialog(), &CustomColorDialog::rejected,
this, &ContextPaneTextWidget::onColorDialogCancled);
connect(ui->fontSizeSpinBox, QOverload<int>::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<int>::of(&QComboBox::currentIndexChanged),
connect(ui->styleComboBox, &QComboBox::currentIndexChanged,
this, &ContextPaneTextWidget::onStyleComboBoxChanged);
}

View File

@@ -112,13 +112,13 @@ CustomColorDialog::CustomColorDialog(QWidget *parent) : QFrame(parent )
resize(sizeHint());
connect(m_colorBox, &ColorBox::colorChanged, this, &CustomColorDialog::onColorBoxChanged);
connect(m_alphaSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
connect(m_alphaSpinBox, &QDoubleSpinBox::valueChanged,
this, &CustomColorDialog::spinBoxChanged);
connect(m_rSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
connect(m_rSpinBox, &QDoubleSpinBox::valueChanged,
this, &CustomColorDialog::spinBoxChanged);
connect(m_gSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
connect(m_gSpinBox, &QDoubleSpinBox::valueChanged,
this, &CustomColorDialog::spinBoxChanged);
connect(m_bSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
connect(m_bSpinBox, &QDoubleSpinBox::valueChanged,
this, &CustomColorDialog::spinBoxChanged);
connect(m_hueControl, &HueControl::hueChanged, this, &CustomColorDialog::onHueChanged);

View File

@@ -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<double>::of(&QDoubleSpinBox::valueChanged),
connect(ui->overshootSpinBox, &QDoubleSpinBox::valueChanged,
this, &EasingContextPane::overshootChanged);
connect(ui->periodSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
connect(ui->periodSpinBox, &QDoubleSpinBox::valueChanged,
this, &EasingContextPane::periodChanged);
connect(ui->amplitudeSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
connect(ui->amplitudeSpinBox, &QDoubleSpinBox::valueChanged,
this, &EasingContextPane::amplitudeChanged);
connect(ui->easingExtremesComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(ui->easingExtremesComboBox, &QComboBox::currentIndexChanged,
this, &EasingContextPane::easingExtremesChanged);
connect(ui->easingShapeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(ui->easingShapeComboBox, &QComboBox::currentIndexChanged,
this, &EasingContextPane::easingShapeChanged);
connect(ui->durationSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
connect(ui->durationSpinBox, &QSpinBox::valueChanged,
this, &EasingContextPane::durationChanged);
}

View File

@@ -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) {

View File

@@ -49,23 +49,23 @@ ActionEditorDialog::ActionEditorDialog(QWidget *parent)
{
setupUIComponents();
QObject::connect(m_comboBoxType, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_comboBoxType, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::Type); });
// Action connections
QObject::connect(m_actionTargetItem, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_actionTargetItem, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetItem); });
QObject::connect(m_actionMethod, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_actionMethod, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetProperty); });
// Assignment connections
QObject::connect(m_assignmentTargetItem, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_assignmentTargetItem, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetItem); });
QObject::connect(m_assignmentTargetProperty, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_assignmentTargetProperty, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::TargetProperty); });
QObject::connect(m_assignmentSourceItem, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_assignmentSourceItem, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::SourceItem); });
QObject::connect(m_assignmentSourceProperty, QOverload<int>::of(&QComboBox::activated),
QObject::connect(m_assignmentSourceProperty, &QComboBox::activated,
[this] (int idx) { this->updateComboBoxes(idx, ComboBox::SourceProperty); });
}

View File

@@ -47,11 +47,11 @@ BindingEditorDialog::BindingEditorDialog(QWidget *parent)
{
setupUIComponents();
QObject::connect(m_comboBoxItem, QOverload<int>::of(&QComboBox::currentIndexChanged),
QObject::connect(m_comboBoxItem, &QComboBox::currentIndexChanged,
this, &BindingEditorDialog::itemIDChanged);
QObject::connect(m_comboBoxProperty, QOverload<int>::of(&QComboBox::currentIndexChanged),
QObject::connect(m_comboBoxProperty, &QComboBox::currentIndexChanged,
this, &BindingEditorDialog::propertyIDChanged);
QObject::connect(m_checkBoxNot, QOverload<int>::of(&QCheckBox::stateChanged),
QObject::connect(m_checkBoxNot, &QCheckBox::stateChanged,
this, &BindingEditorDialog::checkBoxChanged);
}

View File

@@ -136,8 +136,7 @@ QWidget *ZoomAction::createWidget(QWidget *parent)
m_combo->setCurrentIndex(indexOf(1.0));
m_combo->setToolTip(m_combo->currentText());
auto currentChanged = QOverload<int>::of(&QComboBox::currentIndexChanged);
connect(m_combo, currentChanged, this, &ZoomAction::emitZoomLevelChanged);
connect(m_combo, &QComboBox::currentIndexChanged, this, &ZoomAction::emitZoomLevelChanged);
return m_combo.data();
}

View File

@@ -178,7 +178,7 @@ QWidget *BindingDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt
default: qWarning() << "BindingDelegate::createEditor column" << index.column();
}
connect(bindingComboBox, QOverload<int>::of(&QComboBox::activated), this, [=]() {
connect(bindingComboBox, &QComboBox::activated, this, [=] {
auto delegate = const_cast<BindingDelegate*>(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<int>::of(&QComboBox::activated), this, [=]() {
connect(dynamicPropertiesComboBox, &QComboBox::activated, this, [=] {
auto delegate = const_cast<DynamicPropertiesDelegate*>(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<int>::of(&QComboBox::activated), this, [=]() {
connect(connectionComboBox, &QComboBox::activated, this, [=] {
auto delegate = const_cast<ConnectionDelegate*>(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<int>::of(&QComboBox::activated), this, [=]() {
connect(backendComboBox, &QComboBox::activated, this, [=] {
auto delegate = const_cast<BackendDelegate*>(this);
emit delegate->commitData(backendComboBox);
});

View File

@@ -101,13 +101,9 @@ CurveEditorToolBar::CurveEditorToolBar(CurveEditorModel *model, QWidget* parent)
m_startSpin->setRange(std::numeric_limits<int>::lowest(), std::numeric_limits<int>::max());
m_startSpin->setValue(model->minimumTime());
connect(
m_startSpin, QOverload<int>::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<int>::lowest(), std::numeric_limits<int>::max());
m_endSpin->setValue(model->maximumTime());
connect(
m_endSpin, QOverload<int>::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<int>::max());
connect(
m_currentSpin, QOverload<int>::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")));

View File

@@ -71,7 +71,7 @@ QWidget *BackgroundAction::createWidget(QWidget *parent)
}
comboBox->setCurrentIndex(0);
connect(comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(comboBox, &QComboBox::currentIndexChanged,
this, &BackgroundAction::emitBackgroundChanged);
comboBox->setProperty("hideborder", true);

View File

@@ -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<int>::of(&QComboBox::activated),
this, &ComponentAction::emitCurrentComponentChanged);
connect(comboBox, &QComboBox::activated, this, &ComponentAction::emitCurrentComponentChanged);
connect(this, &ComponentAction::currentIndexChanged, comboBox, &QComboBox::setCurrentIndex);
return comboBox;

View File

@@ -565,8 +565,8 @@ QGridLayout *ItemLibraryAssetImportDialog::createOptionsGrid(
optSpin->setMinimumWidth(controlMinWidth);
optControl = optSpin;
if (advanced) {
QObject::connect(optSpin, QOverload<double>::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<double>::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<double>::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<double>::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);
});
}

View File

@@ -100,25 +100,21 @@ CanvasStyleDialog::CanvasStyleDialog(const CanvasStyle &style, QWidget *parent)
emit styleChanged(out);
};
auto doubleValueChanged = QOverload<double>::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

View File

@@ -138,18 +138,10 @@ EasingCurveDialog::EasingCurveDialog(const QList<ModelNode> &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<int>::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);

View File

@@ -56,11 +56,11 @@ TimelineAnimationForm::TimelineAnimationForm(QWidget *parent)
connectSpinBox(ui->startFrame, "from");
connectSpinBox(ui->endFrame, "to");
connect(ui->loops, QOverload<int>::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<int>::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())

View File

@@ -148,7 +148,7 @@ QWidget *TimelineEditorDelegate::createEditor(QWidget *parent,
}
if (comboBox) {
connect(comboBox, QOverload<int>::of(&QComboBox::activated), this, [=]() {
connect(comboBox, &QComboBox::activated, this, [=] {
auto delegate = const_cast<TimelineEditorDelegate *>(this);
emit delegate->commitData(comboBox);
});

View File

@@ -37,10 +37,7 @@ public:
void operator()(QProcess *process)
{
process->disconnect();
QObject::connect(process,
QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
process,
&QProcess::deleteLater);
QObject::connect(process, &QProcess::finished, process, &QProcess::deleteLater);
process->kill();
}
};

View File

@@ -427,10 +427,8 @@ void DesignModeWidget::setup()
workspaceComboBox->setCurrentText(m_dockManager->activeWorkspace());
});
connect(m_dockManager, &ADS::DockManager::workspaceLoaded, workspaceComboBox, &QComboBox::setCurrentText);
connect(workspaceComboBox,
QOverload<int>::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());
});

View File

@@ -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<int>::of(&QComboBox::currentIndexChanged), [this, comboBox](int index) {
connect(comboBox, &QComboBox::currentIndexChanged, [this, comboBox](int index) {
if (index == 0) // == Default
emit currentLocaleChanged("");
else

View File

@@ -571,7 +571,7 @@ void QmlJSEditorWidget::createToolBar()
policy.setHorizontalPolicy(QSizePolicy::Expanding);
m_outlineCombo->setSizePolicy(policy);
connect(m_outlineCombo, QOverload<int>::of(&QComboBox::activated),
connect(m_outlineCombo, &QComboBox::activated,
this, &QmlJSEditorWidget::jumpToOutlineElement);
connect(m_qmlJsEditorDocument->outlineModel(), &Internal::QmlOutlineModel::updated,
static_cast<QTreeView *>(m_outlineCombo->view()), &QTreeView::expandAll);

View File

@@ -38,8 +38,7 @@ QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent) :
{
ui->setupUi(this);
auto spinValueChanged = QOverload<int>::of(&QSpinBox::valueChanged);
connect(ui->lineLengthSpinBox, spinValueChanged,
connect(ui->lineLengthSpinBox, &QSpinBox::valueChanged,
this, &QmlJSCodeStyleSettingsWidget::slotSettingsChanged);
}

View File

@@ -85,8 +85,7 @@ void QmlMainFileAspect::addToLayout(LayoutBuilder &builder)
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::fileListChanged,
this, &QmlMainFileAspect::updateFileComboBox);
connect(m_fileListCombo, QOverload<int>::of(&QComboBox::activated),
this, &QmlMainFileAspect::setMainScript);
connect(m_fileListCombo, &QComboBox::activated, this, &QmlMainFileAspect::setMainScript);
builder.addItems({tr("Main QML file:"), m_fileListCombo.data()});
}