forked from qt-creator/qt-creator
Drop Qt5: VCS: Get rid of QComboBox QOverload
Change-Id: Ib2f21f28a0ec16b817f9227c6234424001752d50 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -65,8 +65,7 @@ ActivitySelector::ActivitySelector(QWidget *parent) : QWidget(parent)
|
||||
connect(btnAdd, &QToolButton::clicked, this, &ActivitySelector::newActivity);
|
||||
|
||||
refresh();
|
||||
connect(m_cmbActivity, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &ActivitySelector::userChanged);
|
||||
connect(m_cmbActivity, &QComboBox::currentIndexChanged, this, &ActivitySelector::userChanged);
|
||||
}
|
||||
|
||||
void ActivitySelector::userChanged()
|
||||
@@ -102,10 +101,10 @@ void ActivitySelector::setActivity(const QString &act)
|
||||
{
|
||||
int index = m_cmbActivity->findData(act);
|
||||
if (index != -1) {
|
||||
disconnect(m_cmbActivity, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
disconnect(m_cmbActivity, &QComboBox::currentIndexChanged,
|
||||
this, &ActivitySelector::userChanged);
|
||||
m_cmbActivity->setCurrentIndex(index);
|
||||
connect(m_cmbActivity, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_cmbActivity, &QComboBox::currentIndexChanged,
|
||||
this, &ActivitySelector::userChanged);
|
||||
}
|
||||
}
|
||||
|
@@ -147,10 +147,10 @@ GerritPushDialog::GerritPushDialog(const Utils::FilePath &workingDir, const QStr
|
||||
}
|
||||
|
||||
m_ui->localBranchComboBox->init(workingDir);
|
||||
connect(m_ui->localBranchComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui->localBranchComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &GerritPushDialog::updateCommits);
|
||||
|
||||
connect(m_ui->targetBranchComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui->targetBranchComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &GerritPushDialog::setChangeRange);
|
||||
|
||||
connect(m_ui->targetBranchComboBox, &QComboBox::currentTextChanged,
|
||||
|
@@ -57,7 +57,7 @@ GitLabDialog::GitLabDialog(QWidget *parent)
|
||||
|
||||
updateRemotes();
|
||||
|
||||
connect(m_ui.remoteCB, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_ui.remoteCB, &QComboBox::currentIndexChanged,
|
||||
this, &GitLabDialog::requestMainViewUpdate);
|
||||
connect(m_ui.searchLE, &QLineEdit::returnPressed, this, &GitLabDialog::querySearch);
|
||||
connect(m_ui.searchPB, &QPushButton::clicked, this, &GitLabDialog::querySearch);
|
||||
|
@@ -156,8 +156,7 @@ GitLabOptionsWidget::GitLabOptionsWidget(QWidget *parent)
|
||||
connect(m_edit, &QPushButton::clicked, this, &GitLabOptionsWidget::showEditServerDialog);
|
||||
connect(m_remove, &QPushButton::clicked, this, &GitLabOptionsWidget::removeCurrentTriggered);
|
||||
connect(m_add, &QPushButton::clicked, this, &GitLabOptionsWidget::showAddServerDialog);
|
||||
connect(m_defaultGitLabServer, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() {
|
||||
connect(m_defaultGitLabServer, &QComboBox::currentIndexChanged, this, [this] {
|
||||
m_gitLabServerWidget->setGitLabServer(
|
||||
m_defaultGitLabServer->currentData().value<GitLabServer>());
|
||||
});
|
||||
|
@@ -163,20 +163,18 @@ GitLabProjectSettingsWidget::GitLabProjectSettingsWidget(ProjectExplorer::Projec
|
||||
verticalLayout->addWidget(new QLabel(tr("Projects linked with GitLab receive event "
|
||||
"notifications in the Version Control output pane.")));
|
||||
|
||||
connect(m_linkWithGitLab, &QPushButton::clicked, this, [this]() {
|
||||
connect(m_linkWithGitLab, &QPushButton::clicked, this, [this] {
|
||||
checkConnection(Link);
|
||||
});
|
||||
connect(m_unlink, &QPushButton::clicked,
|
||||
this, &GitLabProjectSettingsWidget::unlink);
|
||||
connect(m_checkConnection, &QPushButton::clicked, this, [this]() {
|
||||
connect(m_checkConnection, &QPushButton::clicked, this, [this] {
|
||||
checkConnection(Connection);
|
||||
});
|
||||
connect(m_linkedGitLabServer, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() {
|
||||
connect(m_linkedGitLabServer, &QComboBox::currentIndexChanged, this, [this] {
|
||||
m_infoLabel->setVisible(false);
|
||||
});
|
||||
connect(m_hostCB, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() {
|
||||
connect(m_hostCB, &QComboBox::currentIndexChanged, this, [this] {
|
||||
m_infoLabel->setVisible(false);
|
||||
});
|
||||
connect(GitLabPlugin::optionsPage(), &GitLabOptionsPage::settingsChanged,
|
||||
|
@@ -286,7 +286,7 @@ void SubmitFieldWidget::createField(const QString &f)
|
||||
if (d->completer)
|
||||
fe.lineEdit->setCompleter(d->completer);
|
||||
|
||||
connect(fe.combo, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(fe.combo, &QComboBox::currentIndexChanged,
|
||||
this, &SubmitFieldWidget::slotComboIndexChanged);
|
||||
connect(fe.clearButton, &QAbstractButton::clicked,
|
||||
this, &SubmitFieldWidget::slotRemove);
|
||||
|
@@ -740,7 +740,7 @@ void VcsBaseEditorWidget::init()
|
||||
case OtherContent:
|
||||
break;
|
||||
case LogOutput:
|
||||
connect(d->entriesComboBox(), QOverload<int>::of(&QComboBox::activated),
|
||||
connect(d->entriesComboBox(), &QComboBox::activated,
|
||||
this, &VcsBaseEditorWidget::slotJumpToEntry);
|
||||
connect(this, &QPlainTextEdit::textChanged,
|
||||
this, &VcsBaseEditorWidget::slotPopulateLogBrowser);
|
||||
@@ -753,7 +753,7 @@ void VcsBaseEditorWidget::init()
|
||||
break;
|
||||
case DiffOutput:
|
||||
// Diff: set up diff file browsing
|
||||
connect(d->entriesComboBox(), QOverload<int>::of(&QComboBox::activated),
|
||||
connect(d->entriesComboBox(), &QComboBox::activated,
|
||||
this, &VcsBaseEditorWidget::slotJumpToEntry);
|
||||
connect(this, &QPlainTextEdit::textChanged,
|
||||
this, &VcsBaseEditorWidget::slotPopulateDiffBrowser);
|
||||
|
@@ -196,8 +196,7 @@ QComboBox *VcsBaseEditorConfig::addChoices(const QString &title,
|
||||
cb->setToolTip(title);
|
||||
for (const ChoiceItem &item : items)
|
||||
cb->addItem(item.displayText, item.value);
|
||||
connect(cb, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &VcsBaseEditorConfig::argumentsChanged);
|
||||
connect(cb, &QComboBox::currentIndexChanged, this, &VcsBaseEditorConfig::argumentsChanged);
|
||||
d->m_toolBar->addWidget(cb);
|
||||
d->m_optionMappings.append(OptionMapping(options, cb));
|
||||
return cb;
|
||||
|
Reference in New Issue
Block a user