forked from qt-creator/qt-creator
Drop Qt5: ProjectExplorer: Get rid of QOverload
Change-Id: Id8b28efa7b31a92a5e24485803322c586a23802d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -85,15 +85,14 @@ AbiWidget::AbiWidget(QWidget *parent) : QWidget(parent),
|
|||||||
d->m_abi->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
d->m_abi->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
||||||
d->m_abi->setMinimumContentsLength(4);
|
d->m_abi->setMinimumContentsLength(4);
|
||||||
layout->addWidget(d->m_abi);
|
layout->addWidget(d->m_abi);
|
||||||
connect(d->m_abi, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(d->m_abi, &QComboBox::currentIndexChanged, this, &AbiWidget::mainComboBoxChanged);
|
||||||
this, &AbiWidget::mainComboBoxChanged);
|
|
||||||
|
|
||||||
d->m_architectureComboBox = new QComboBox(this);
|
d->m_architectureComboBox = new QComboBox(this);
|
||||||
layout->addWidget(d->m_architectureComboBox);
|
layout->addWidget(d->m_architectureComboBox);
|
||||||
for (int i = 0; i <= static_cast<int>(Abi::UnknownArchitecture); ++i)
|
for (int i = 0; i <= static_cast<int>(Abi::UnknownArchitecture); ++i)
|
||||||
d->m_architectureComboBox->addItem(Abi::toString(static_cast<Abi::Architecture>(i)), i);
|
d->m_architectureComboBox->addItem(Abi::toString(static_cast<Abi::Architecture>(i)), i);
|
||||||
d->m_architectureComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownArchitecture));
|
d->m_architectureComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownArchitecture));
|
||||||
connect(d->m_architectureComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(d->m_architectureComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &AbiWidget::customComboBoxesChanged);
|
this, &AbiWidget::customComboBoxesChanged);
|
||||||
|
|
||||||
QLabel *separator1 = new QLabel(this);
|
QLabel *separator1 = new QLabel(this);
|
||||||
@@ -106,7 +105,7 @@ AbiWidget::AbiWidget(QWidget *parent) : QWidget(parent),
|
|||||||
for (int i = 0; i <= static_cast<int>(Abi::UnknownOS); ++i)
|
for (int i = 0; i <= static_cast<int>(Abi::UnknownOS); ++i)
|
||||||
d->m_osComboBox->addItem(Abi::toString(static_cast<Abi::OS>(i)), i);
|
d->m_osComboBox->addItem(Abi::toString(static_cast<Abi::OS>(i)), i);
|
||||||
d->m_osComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownOS));
|
d->m_osComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownOS));
|
||||||
connect(d->m_osComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(d->m_osComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &AbiWidget::customOsComboBoxChanged);
|
this, &AbiWidget::customOsComboBoxChanged);
|
||||||
|
|
||||||
QLabel *separator2 = new QLabel(this);
|
QLabel *separator2 = new QLabel(this);
|
||||||
@@ -116,7 +115,7 @@ AbiWidget::AbiWidget(QWidget *parent) : QWidget(parent),
|
|||||||
|
|
||||||
d->m_osFlavorComboBox = new QComboBox(this);
|
d->m_osFlavorComboBox = new QComboBox(this);
|
||||||
layout->addWidget(d->m_osFlavorComboBox);
|
layout->addWidget(d->m_osFlavorComboBox);
|
||||||
connect(d->m_osFlavorComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(d->m_osFlavorComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &AbiWidget::customComboBoxesChanged);
|
this, &AbiWidget::customComboBoxesChanged);
|
||||||
|
|
||||||
QLabel *separator3 = new QLabel(this);
|
QLabel *separator3 = new QLabel(this);
|
||||||
@@ -129,7 +128,7 @@ AbiWidget::AbiWidget(QWidget *parent) : QWidget(parent),
|
|||||||
for (int i = 0; i <= static_cast<int>(Abi::UnknownFormat); ++i)
|
for (int i = 0; i <= static_cast<int>(Abi::UnknownFormat); ++i)
|
||||||
d->m_binaryFormatComboBox->addItem(Abi::toString(static_cast<Abi::BinaryFormat>(i)), i);
|
d->m_binaryFormatComboBox->addItem(Abi::toString(static_cast<Abi::BinaryFormat>(i)), i);
|
||||||
d->m_binaryFormatComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownFormat));
|
d->m_binaryFormatComboBox->setCurrentIndex(static_cast<int>(Abi::UnknownFormat));
|
||||||
connect(d->m_binaryFormatComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(d->m_binaryFormatComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &AbiWidget::customComboBoxesChanged);
|
this, &AbiWidget::customComboBoxesChanged);
|
||||||
|
|
||||||
QLabel *separator4 = new QLabel(this);
|
QLabel *separator4 = new QLabel(this);
|
||||||
@@ -146,7 +145,7 @@ AbiWidget::AbiWidget(QWidget *parent) : QWidget(parent),
|
|||||||
d->m_wordWidthComboBox->addItem(Abi::toString(0), 0);
|
d->m_wordWidthComboBox->addItem(Abi::toString(0), 0);
|
||||||
// Setup current word width of 0 by default.
|
// Setup current word width of 0 by default.
|
||||||
d->m_wordWidthComboBox->setCurrentIndex(d->m_wordWidthComboBox->count() - 1);
|
d->m_wordWidthComboBox->setCurrentIndex(d->m_wordWidthComboBox->count() - 1);
|
||||||
connect(d->m_wordWidthComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(d->m_wordWidthComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &AbiWidget::customComboBoxesChanged);
|
this, &AbiWidget::customComboBoxesChanged);
|
||||||
|
|
||||||
layout->setStretchFactor(d->m_abi, 1);
|
layout->setStretchFactor(d->m_abi, 1);
|
||||||
|
@@ -123,11 +123,11 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) :
|
|||||||
updateAddButtonMenu();
|
updateAddButtonMenu();
|
||||||
updateBuildSettings();
|
updateBuildSettings();
|
||||||
|
|
||||||
connect(m_buildConfigurationComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_buildConfigurationComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &BuildSettingsWidget::currentIndexChanged);
|
this, &BuildSettingsWidget::currentIndexChanged);
|
||||||
|
|
||||||
connect(m_removeButton, &QAbstractButton::clicked,
|
connect(m_removeButton, &QAbstractButton::clicked,
|
||||||
this, [this]() { deleteConfiguration(m_buildConfiguration); });
|
this, [this] { deleteConfiguration(m_buildConfiguration); });
|
||||||
|
|
||||||
connect(m_renameButton, &QAbstractButton::clicked,
|
connect(m_renameButton, &QAbstractButton::clicked,
|
||||||
this, &BuildSettingsWidget::renameConfiguration);
|
this, &BuildSettingsWidget::renameConfiguration);
|
||||||
|
@@ -44,20 +44,20 @@ CustomParserConfigDialog::CustomParserConfigDialog(QWidget *parent) :
|
|||||||
connect(ui->errorPattern, &QLineEdit::textChanged, this, &CustomParserConfigDialog::changed);
|
connect(ui->errorPattern, &QLineEdit::textChanged, this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->errorOutputMessage, &QLineEdit::textChanged,
|
connect(ui->errorOutputMessage, &QLineEdit::textChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->errorFileNameCap, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->errorFileNameCap, &QSpinBox::valueChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->errorLineNumberCap, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->errorLineNumberCap, &QSpinBox::valueChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->errorMessageCap, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->errorMessageCap, &QSpinBox::valueChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->warningPattern, &QLineEdit::textChanged, this, &CustomParserConfigDialog::changed);
|
connect(ui->warningPattern, &QLineEdit::textChanged, this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->warningOutputMessage, &QLineEdit::textChanged,
|
connect(ui->warningOutputMessage, &QLineEdit::textChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->warningFileNameCap, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->warningFileNameCap, &QSpinBox::valueChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->warningLineNumberCap, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->warningLineNumberCap, &QSpinBox::valueChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
connect(ui->warningMessageCap, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->warningMessageCap, &QSpinBox::valueChanged,
|
||||||
this, &CustomParserConfigDialog::changed);
|
this, &CustomParserConfigDialog::changed);
|
||||||
|
|
||||||
changed();
|
changed();
|
||||||
|
@@ -432,7 +432,7 @@ CustomToolChainConfigWidget::CustomToolChainConfigWidget(CustomToolChain *tc) :
|
|||||||
this, &CustomToolChainConfigWidget::updateSummaries);
|
this, &CustomToolChainConfigWidget::updateSummaries);
|
||||||
connect(m_cxx11Flags, &QLineEdit::textChanged, this, &ToolChainConfigWidget::dirty);
|
connect(m_cxx11Flags, &QLineEdit::textChanged, this, &ToolChainConfigWidget::dirty);
|
||||||
connect(m_mkspecs, &QLineEdit::textChanged, this, &ToolChainConfigWidget::dirty);
|
connect(m_mkspecs, &QLineEdit::textChanged, this, &ToolChainConfigWidget::dirty);
|
||||||
connect(m_errorParserComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_errorParserComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &CustomToolChainConfigWidget::errorParserChanged);
|
this, &CustomToolChainConfigWidget::errorParserChanged);
|
||||||
errorParserChanged();
|
errorParserChanged();
|
||||||
}
|
}
|
||||||
|
@@ -184,7 +184,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
|
|||||||
|
|
||||||
proxyModel.setFilterRegularExpression(processFilterLineEdit->text());
|
proxyModel.setFilterRegularExpression(processFilterLineEdit->text());
|
||||||
|
|
||||||
connect(processFilterLineEdit, QOverload<const QString &>::of(&FancyLineEdit::textChanged),
|
connect(processFilterLineEdit, &FancyLineEdit::textChanged,
|
||||||
&proxyModel, QOverload<const QString &>::of(&ProcessListFilterModel::setFilterRegularExpression));
|
&proxyModel, QOverload<const QString &>::of(&ProcessListFilterModel::setFilterRegularExpression));
|
||||||
connect(procView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
connect(procView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
||||||
this, &DeviceProcessesDialogPrivate::updateButtons);
|
this, &DeviceProcessesDialogPrivate::updateButtons);
|
||||||
|
@@ -121,7 +121,7 @@ void DeviceSettingsWidget::initGui()
|
|||||||
lastIndex = 0;
|
lastIndex = 0;
|
||||||
if (lastIndex < m_ui->configurationComboBox->count())
|
if (lastIndex < m_ui->configurationComboBox->count())
|
||||||
m_ui->configurationComboBox->setCurrentIndex(lastIndex);
|
m_ui->configurationComboBox->setCurrentIndex(lastIndex);
|
||||||
connect(m_ui->configurationComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_ui->configurationComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &DeviceSettingsWidget::currentDeviceChanged);
|
this, &DeviceSettingsWidget::currentDeviceChanged);
|
||||||
currentDeviceChanged(currentIndex());
|
currentDeviceChanged(currentIndex());
|
||||||
connect(m_ui->defaultDeviceButton, &QAbstractButton::clicked,
|
connect(m_ui->defaultDeviceButton, &QAbstractButton::clicked,
|
||||||
|
@@ -101,7 +101,7 @@ EditorSettingsWidget::EditorSettingsWidget(Project *project) : m_project(project
|
|||||||
config, &EditorConfiguration::setShowWrapColumn);
|
config, &EditorConfiguration::setShowWrapColumn);
|
||||||
connect(m_useIndenter, &QAbstractButton::toggled,
|
connect(m_useIndenter, &QAbstractButton::toggled,
|
||||||
config, &EditorConfiguration::setUseIndenter);
|
config, &EditorConfiguration::setUseIndenter);
|
||||||
connect(m_wrapColumn, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(m_wrapColumn, &QSpinBox::valueChanged,
|
||||||
config, &EditorConfiguration::setWrapColumn);
|
config, &EditorConfiguration::setWrapColumn);
|
||||||
|
|
||||||
connect(m_behaviorSettings, &TextEditor::BehaviorSettingsWidget::typingSettingsChanged,
|
connect(m_behaviorSettings, &TextEditor::BehaviorSettingsWidget::typingSettingsChanged,
|
||||||
|
@@ -63,7 +63,7 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect)
|
|||||||
m_baseEnvironmentComboBox->setEnabled(false);
|
m_baseEnvironmentComboBox->setEnabled(false);
|
||||||
m_baseEnvironmentComboBox->setCurrentIndex(m_aspect->baseEnvironmentBase());
|
m_baseEnvironmentComboBox->setCurrentIndex(m_aspect->baseEnvironmentBase());
|
||||||
|
|
||||||
connect(m_baseEnvironmentComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_baseEnvironmentComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &EnvironmentAspectWidget::baseEnvironmentSelected);
|
this, &EnvironmentAspectWidget::baseEnvironmentSelected);
|
||||||
|
|
||||||
m_baseLayout->addWidget(m_baseEnvironmentComboBox);
|
m_baseLayout->addWidget(m_baseEnvironmentComboBox);
|
||||||
|
@@ -83,7 +83,7 @@ ExtraCompiler::ExtraCompiler(const Project *project, const FilePath &source,
|
|||||||
d->contents.insert(target, QByteArray());
|
d->contents.insert(target, QByteArray());
|
||||||
d->timer.setSingleShot(true);
|
d->timer.setSingleShot(true);
|
||||||
|
|
||||||
connect(&d->timer, &QTimer::timeout, this, [this](){
|
connect(&d->timer, &QTimer::timeout, this, [this] {
|
||||||
if (d->dirty && d->lastEditor) {
|
if (d->dirty && d->lastEditor) {
|
||||||
d->dirty = false;
|
d->dirty = false;
|
||||||
run(d->lastEditor->document()->contents());
|
run(d->lastEditor->document()->contents());
|
||||||
|
@@ -115,7 +115,7 @@ public:
|
|||||||
m_expander.setDisplayName(JsonFieldPage::tr("Line Edit Validator Expander"));
|
m_expander.setDisplayName(JsonFieldPage::tr("Line Edit Validator Expander"));
|
||||||
m_expander.setAccumulating(true);
|
m_expander.setAccumulating(true);
|
||||||
m_expander.registerVariable("INPUT", JsonFieldPage::tr("The text edit input to fix up."),
|
m_expander.registerVariable("INPUT", JsonFieldPage::tr("The text edit input to fix up."),
|
||||||
[this]() { return m_currentInput; });
|
[this] { return m_currentInput; });
|
||||||
m_expander.registerSubProvider([expander]() -> MacroExpander * { return expander; });
|
m_expander.registerSubProvider([expander]() -> MacroExpander * { return expander; });
|
||||||
setValidationFunction([this, pattern](FancyLineEdit *, QString *) {
|
setValidationFunction([this, pattern](FancyLineEdit *, QString *) {
|
||||||
return pattern.match(text()).hasMatch();
|
return pattern.match(text()).hasMatch();
|
||||||
@@ -1241,7 +1241,7 @@ void ComboBoxField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
// the selectionModel does not behave like expected and wanted - so we block signals here
|
// 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, ...)
|
// (for example there was some losing focus thing when hovering over items, ...)
|
||||||
selectionModel()->blockSignals(true);
|
selectionModel()->blockSignals(true);
|
||||||
QObject::connect(w, QOverload<int>::of(&QComboBox::activated), [w, this](int index) {
|
QObject::connect(w, &QComboBox::activated, [w, this](int index) {
|
||||||
w->blockSignals(true);
|
w->blockSignals(true);
|
||||||
selectionModel()->clearSelection();
|
selectionModel()->clearSelection();
|
||||||
|
|
||||||
@@ -1251,7 +1251,7 @@ void ComboBoxField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
selectionModel()->blockSignals(true);
|
selectionModel()->blockSignals(true);
|
||||||
w->blockSignals(false);
|
w->blockSignals(false);
|
||||||
});
|
});
|
||||||
page->registerObjectAsFieldWithName<QComboBox>(name, w, QOverload<int>::of(&QComboBox::activated), [w]() {
|
page->registerObjectAsFieldWithName<QComboBox>(name, w, &QComboBox::activated, [w] {
|
||||||
return w->currentData(ValueRole);
|
return w->currentData(ValueRole);
|
||||||
});
|
});
|
||||||
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
|
QObject::connect(selectionModel(), &QItemSelectionModel::selectionChanged, page, [page]() {
|
||||||
@@ -1262,8 +1262,7 @@ void ComboBoxField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
QWidget *ComboBoxField::createWidget(const QString & /*displayName*/, JsonFieldPage * /*page*/)
|
QWidget *ComboBoxField::createWidget(const QString & /*displayName*/, JsonFieldPage * /*page*/)
|
||||||
{
|
{
|
||||||
const auto comboBox = new QComboBox;
|
const auto comboBox = new QComboBox;
|
||||||
QObject::connect(comboBox, QOverload<int>::of(&QComboBox::activated),
|
QObject::connect(comboBox, &QComboBox::activated, [this] { setHasUserChanges(); });
|
||||||
[this] { setHasUserChanges(); });
|
|
||||||
return comboBox;
|
return comboBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1317,7 +1316,8 @@ void IconListField::setup(JsonFieldPage *page, const QString &name)
|
|||||||
|
|
||||||
w->setModel(itemModel());
|
w->setModel(itemModel());
|
||||||
setSelectionModel(w->selectionModel());
|
setSelectionModel(w->selectionModel());
|
||||||
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(), &QItemSelectionModel::selectionChanged, [this]() {
|
page->registerObjectAsFieldWithName<QItemSelectionModel>(name, selectionModel(),
|
||||||
|
&QItemSelectionModel::selectionChanged, [this] {
|
||||||
const QModelIndex i = selectionModel()->currentIndex();
|
const QModelIndex i = selectionModel()->currentIndex();
|
||||||
if (i.isValid())
|
if (i.isValid())
|
||||||
return i.data(ValueRole);
|
return i.data(ValueRole);
|
||||||
|
@@ -60,10 +60,8 @@ KitChooser::KitChooser(QWidget *parent) :
|
|||||||
layout->addWidget(m_manageButton);
|
layout->addWidget(m_manageButton);
|
||||||
setFocusProxy(m_manageButton);
|
setFocusProxy(m_manageButton);
|
||||||
|
|
||||||
connect(m_chooser, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_chooser, &QComboBox::currentIndexChanged, this, &KitChooser::onCurrentIndexChanged);
|
||||||
this, &KitChooser::onCurrentIndexChanged);
|
connect(m_chooser, &QComboBox::activated, this, &KitChooser::onActivated);
|
||||||
connect(m_chooser, QOverload<int>::of(&QComboBox::activated),
|
|
||||||
this, &KitChooser::onActivated);
|
|
||||||
connect(m_manageButton, &QAbstractButton::clicked, this, &KitChooser::onManageButtonClicked);
|
connect(m_manageButton, &QAbstractButton::clicked, this, &KitChooser::onManageButtonClicked);
|
||||||
connect(KitManager::instance(), &KitManager::kitsChanged, this, &KitChooser::populate);
|
connect(KitManager::instance(), &KitManager::kitsChanged, this, &KitChooser::populate);
|
||||||
}
|
}
|
||||||
|
@@ -241,8 +241,9 @@ public:
|
|||||||
layout->addWidget(cb, row, 1);
|
layout->addWidget(cb, row, 1);
|
||||||
++row;
|
++row;
|
||||||
|
|
||||||
connect(cb, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(cb, &QComboBox::currentIndexChanged, this, [this, l](int idx) {
|
||||||
this, [this, l](int idx) { currentToolChainChanged(l, idx); });
|
currentToolChainChanged(l, idx);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
@@ -782,7 +783,7 @@ public:
|
|||||||
m_comboBox->addItem(factory->displayName(), factory->deviceType().toSetting());
|
m_comboBox->addItem(factory->displayName(), factory->deviceType().toSetting());
|
||||||
m_comboBox->setToolTip(ki->description());
|
m_comboBox->setToolTip(ki->description());
|
||||||
refresh();
|
refresh();
|
||||||
connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_comboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &DeviceTypeKitAspectWidget::currentTypeChanged);
|
this, &DeviceTypeKitAspectWidget::currentTypeChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -915,7 +916,7 @@ public:
|
|||||||
this, &DeviceKitAspectWidget::modelAboutToReset);
|
this, &DeviceKitAspectWidget::modelAboutToReset);
|
||||||
connect(m_model, &QAbstractItemModel::modelReset,
|
connect(m_model, &QAbstractItemModel::modelReset,
|
||||||
this, &DeviceKitAspectWidget::modelReset);
|
this, &DeviceKitAspectWidget::modelReset);
|
||||||
connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_comboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &DeviceKitAspectWidget::currentDeviceChanged);
|
this, &DeviceKitAspectWidget::currentDeviceChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1178,7 +1179,7 @@ public:
|
|||||||
this, &BuildDeviceKitAspectWidget::modelAboutToReset);
|
this, &BuildDeviceKitAspectWidget::modelAboutToReset);
|
||||||
connect(m_model, &QAbstractItemModel::modelReset,
|
connect(m_model, &QAbstractItemModel::modelReset,
|
||||||
this, &BuildDeviceKitAspectWidget::modelReset);
|
this, &BuildDeviceKitAspectWidget::modelReset);
|
||||||
connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_comboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &BuildDeviceKitAspectWidget::currentDeviceChanged);
|
this, &BuildDeviceKitAspectWidget::currentDeviceChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -117,7 +117,7 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
|
|||||||
|
|
||||||
auto chooser = new VariableChooser(this);
|
auto chooser = new VariableChooser(this);
|
||||||
chooser->addSupportedWidget(m_nameEdit);
|
chooser->addSupportedWidget(m_nameEdit);
|
||||||
chooser->addMacroExpanderProvider([this]() { return m_modifiedKit->macroExpander(); });
|
chooser->addMacroExpanderProvider([this] { return m_modifiedKit->macroExpander(); });
|
||||||
|
|
||||||
for (KitAspect *aspect : KitManager::kitAspects())
|
for (KitAspect *aspect : KitManager::kitAspects())
|
||||||
addAspectToWorkingCopy(aspect);
|
addAspectToWorkingCopy(aspect);
|
||||||
|
@@ -88,7 +88,7 @@ ProjectExplorerSettingsWidget::ProjectExplorerSettingsWidget(QWidget *parent) :
|
|||||||
m_ui.directoryButtonGroup->setId(m_ui.currentDirectoryRadioButton, UseCurrentDirectory);
|
m_ui.directoryButtonGroup->setId(m_ui.currentDirectoryRadioButton, UseCurrentDirectory);
|
||||||
m_ui.directoryButtonGroup->setId(m_ui.directoryRadioButton, UseProjectDirectory);
|
m_ui.directoryButtonGroup->setId(m_ui.directoryRadioButton, UseProjectDirectory);
|
||||||
|
|
||||||
connect(m_ui.directoryButtonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
|
connect(m_ui.directoryButtonGroup, &QButtonGroup::buttonClicked,
|
||||||
this, &ProjectExplorerSettingsWidget::slotDirectoryButtonGroupChanged);
|
this, &ProjectExplorerSettingsWidget::slotDirectoryButtonGroupChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -628,8 +628,7 @@ public:
|
|||||||
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
|
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
|
||||||
});
|
});
|
||||||
targetDirLayout->addWidget(m_targetDirChooser);
|
targetDirLayout->addWidget(m_targetDirChooser);
|
||||||
connect(m_buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
|
connect(m_buttonGroup, &QButtonGroup::buttonClicked, this, [this] {
|
||||||
this, [this] {
|
|
||||||
switch (dropAction()) {
|
switch (dropAction()) {
|
||||||
case DropAction::CopyWithFiles:
|
case DropAction::CopyWithFiles:
|
||||||
case DropAction::MoveWithFiles:
|
case DropAction::MoveWithFiles:
|
||||||
|
@@ -262,7 +262,7 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent) : QWidget(parent)
|
|||||||
Command *cmd = ActionManager::registerAction(focusDocumentInProjectTree, focusActionId);
|
Command *cmd = ActionManager::registerAction(focusDocumentInProjectTree, focusActionId);
|
||||||
cmd->setDefaultKeySequence(
|
cmd->setDefaultKeySequence(
|
||||||
QKeySequence(useMacShortcuts ? tr("Meta+Shift+L") : tr("Alt+Shift+L")));
|
QKeySequence(useMacShortcuts ? tr("Meta+Shift+L") : tr("Alt+Shift+L")));
|
||||||
connect(focusDocumentInProjectTree, &QAction::triggered, this, [this]() {
|
connect(focusDocumentInProjectTree, &QAction::triggered, this, [this] {
|
||||||
syncFromDocumentManager();
|
syncFromDocumentManager();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -555,7 +555,7 @@ public:
|
|||||||
|
|
||||||
m_projectSelection = new QComboBox;
|
m_projectSelection = new QComboBox;
|
||||||
m_projectSelection->setModel(&m_comboBoxModel);
|
m_projectSelection->setModel(&m_comboBoxModel);
|
||||||
connect(m_projectSelection, QOverload<int>::of(&QComboBox::activated),
|
connect(m_projectSelection, &QComboBox::activated,
|
||||||
this, &ProjectWindowPrivate::projectSelected, Qt::QueuedConnection);
|
this, &ProjectWindowPrivate::projectSelected, Qt::QueuedConnection);
|
||||||
|
|
||||||
const auto switchProjectAction = new QAction(this);
|
const auto switchProjectAction = new QAction(this);
|
||||||
|
@@ -286,9 +286,9 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent) : WizardPage(parent),
|
|||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
m_ui->vcsManageButton->setText(ICore::msgShowOptionsDialog());
|
m_ui->vcsManageButton->setText(ICore::msgShowOptionsDialog());
|
||||||
connect(m_ui->projectComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_ui->projectComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &ProjectWizardPage::projectChanged);
|
this, &ProjectWizardPage::projectChanged);
|
||||||
connect(m_ui->addToVersionControlComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_ui->addToVersionControlComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &ProjectWizardPage::versionControlChanged);
|
this, &ProjectWizardPage::versionControlChanged);
|
||||||
connect(m_ui->vcsManageButton, &QAbstractButton::clicked, this, &ProjectWizardPage::manageVcs);
|
connect(m_ui->vcsManageButton, &QAbstractButton::clicked, this, &ProjectWizardPage::manageVcs);
|
||||||
setProperty(SHORT_TITLE_PROPERTY, tr("Summary"));
|
setProperty(SHORT_TITLE_PROPERTY, tr("Summary"));
|
||||||
@@ -301,7 +301,7 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent) : WizardPage(parent),
|
|||||||
|
|
||||||
ProjectWizardPage::~ProjectWizardPage()
|
ProjectWizardPage::~ProjectWizardPage()
|
||||||
{
|
{
|
||||||
disconnect(m_ui->projectComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
disconnect(m_ui->projectComboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &ProjectWizardPage::projectChanged);
|
this, &ProjectWizardPage::projectChanged);
|
||||||
delete m_ui;
|
delete m_ui;
|
||||||
}
|
}
|
||||||
|
@@ -849,7 +849,7 @@ void InterpreterAspect::addToLayout(LayoutBuilder &builder)
|
|||||||
m_comboBox = new QComboBox;
|
m_comboBox = new QComboBox;
|
||||||
|
|
||||||
updateComboBox();
|
updateComboBox();
|
||||||
connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_comboBox, &QComboBox::currentIndexChanged,
|
||||||
this, &InterpreterAspect::updateCurrentInterpreter);
|
this, &InterpreterAspect::updateCurrentInterpreter);
|
||||||
|
|
||||||
auto manageButton = new QPushButton(tr("Manage..."));
|
auto manageButton = new QPushButton(tr("Manage..."));
|
||||||
|
@@ -140,7 +140,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target) :
|
|||||||
|
|
||||||
connect(m_addDeployMenu, &QMenu::aboutToShow,
|
connect(m_addDeployMenu, &QMenu::aboutToShow,
|
||||||
this, &RunSettingsWidget::aboutToShowDeployMenu);
|
this, &RunSettingsWidget::aboutToShowDeployMenu);
|
||||||
connect(m_deployConfigurationCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_deployConfigurationCombo, &QComboBox::currentIndexChanged,
|
||||||
this, &RunSettingsWidget::currentDeployConfigurationChanged);
|
this, &RunSettingsWidget::currentDeployConfigurationChanged);
|
||||||
connect(m_removeDeployToolButton, &QAbstractButton::clicked,
|
connect(m_removeDeployToolButton, &QAbstractButton::clicked,
|
||||||
this, &RunSettingsWidget::removeDeployConfiguration);
|
this, &RunSettingsWidget::removeDeployConfiguration);
|
||||||
@@ -172,7 +172,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target) :
|
|||||||
|
|
||||||
connect(m_addRunToolButton, &QAbstractButton::clicked,
|
connect(m_addRunToolButton, &QAbstractButton::clicked,
|
||||||
this, &RunSettingsWidget::showAddRunConfigDialog);
|
this, &RunSettingsWidget::showAddRunConfigDialog);
|
||||||
connect(m_runConfigurationCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_runConfigurationCombo, &QComboBox::currentIndexChanged,
|
||||||
this, &RunSettingsWidget::currentRunConfigurationChanged);
|
this, &RunSettingsWidget::currentRunConfigurationChanged);
|
||||||
connect(m_removeRunToolButton, &QAbstractButton::clicked,
|
connect(m_removeRunToolButton, &QAbstractButton::clicked,
|
||||||
this, &RunSettingsWidget::removeRunConfiguration);
|
this, &RunSettingsWidget::removeRunConfiguration);
|
||||||
@@ -437,7 +437,7 @@ void RunSettingsWidget::setConfigurationWidget(RunConfiguration *rc)
|
|||||||
m_runLayout->addWidget(m_runConfigurationWidget);
|
m_runLayout->addWidget(m_runConfigurationWidget);
|
||||||
updateEnabledState();
|
updateEnabledState();
|
||||||
connect(m_runConfiguration, &RunConfiguration::enabledChanged,
|
connect(m_runConfiguration, &RunConfiguration::enabledChanged,
|
||||||
m_runConfigurationWidget, [this]() { updateEnabledState(); });
|
m_runConfigurationWidget, [this] { updateEnabledState(); });
|
||||||
}
|
}
|
||||||
addRunControlWidgets();
|
addRunControlWidgets();
|
||||||
}
|
}
|
||||||
|
@@ -565,7 +565,7 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
|
|||||||
connect(m_baseDirChooser, &Utils::PathChooser::validChanged,
|
connect(m_baseDirChooser, &Utils::PathChooser::validChanged,
|
||||||
this, &SelectableFilesWidget::baseDirectoryChanged);
|
this, &SelectableFilesWidget::baseDirectoryChanged);
|
||||||
connect(m_startParsingButton, &QAbstractButton::clicked,
|
connect(m_startParsingButton, &QAbstractButton::clicked,
|
||||||
this, [this]() { startParsing(m_baseDirChooser->filePath()); });
|
this, [this] { startParsing(m_baseDirChooser->filePath()); });
|
||||||
|
|
||||||
m_selectFilesFilterLabel->setText(tr("Select files matching:"));
|
m_selectFilesFilterLabel->setText(tr("Select files matching:"));
|
||||||
m_selectFilesFilterEdit->setText(selectFilter);
|
m_selectFilesFilterEdit->setText(selectFilter);
|
||||||
|
@@ -93,7 +93,7 @@ SessionNameInputDialog::SessionNameInputDialog(QWidget *parent)
|
|||||||
m_okButton = buttons->button(QDialogButtonBox::Ok);
|
m_okButton = buttons->button(QDialogButtonBox::Ok);
|
||||||
m_switchToButton = new QPushButton;
|
m_switchToButton = new QPushButton;
|
||||||
buttons->addButton(m_switchToButton, QDialogButtonBox::AcceptRole);
|
buttons->addButton(m_switchToButton, QDialogButtonBox::AcceptRole);
|
||||||
connect(m_switchToButton, &QPushButton::clicked, [this]() {
|
connect(m_switchToButton, &QPushButton::clicked, this, [this] {
|
||||||
m_usedSwitchTo = true;
|
m_usedSwitchTo = true;
|
||||||
});
|
});
|
||||||
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||||
|
@@ -320,7 +320,7 @@ public:
|
|||||||
Kit *k = KitManager::kit(m_kitId);
|
Kit *k = KitManager::kit(m_kitId);
|
||||||
if (!k)
|
if (!k)
|
||||||
break;
|
break;
|
||||||
const QString extraText = [this]() {
|
const QString extraText = [this] {
|
||||||
if (m_kitErrorsForProject)
|
if (m_kitErrorsForProject)
|
||||||
return QString("<h3>" + tr("Kit is unsuited for project") + "</h3>");
|
return QString("<h3>" + tr("Kit is unsuited for project") + "</h3>");
|
||||||
if (!isEnabled())
|
if (!isEnabled())
|
||||||
|
@@ -497,7 +497,7 @@ Project::RestoreResult PythonProject::fromMap(const QVariantMap &map, QString *e
|
|||||||
PythonBuildSystem::PythonBuildSystem(Target *target)
|
PythonBuildSystem::PythonBuildSystem(Target *target)
|
||||||
: BuildSystem(target)
|
: BuildSystem(target)
|
||||||
{
|
{
|
||||||
connect(target->project(), &Project::projectFileIsDirty, this, [this]() { triggerParsing(); });
|
connect(target->project(), &Project::projectFileIsDirty, this, [this] { triggerParsing(); });
|
||||||
QTimer::singleShot(0, this, &PythonBuildSystem::triggerParsing);
|
QTimer::singleShot(0, this, &PythonBuildSystem::triggerParsing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user