Commit b95f62e3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly (scripted)

parent 1792abbe
Pipeline #77327 passed with stage
in 8 minutes and 9 seconds
......@@ -648,7 +648,7 @@ Kleo::CryptoConfigEntryDebugLevel::CryptoConfigEntryDebugLevel(CryptoConfigModul
label->setEnabled(false);
mComboBox->setEnabled(false);
} else {
connect(mComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(mComboBox, qOverload<int>(&QComboBox::currentIndexChanged),
this, &CryptoConfigEntryDebugLevel::slotChanged);
}
......@@ -784,7 +784,7 @@ Kleo::CryptoConfigEntrySpinBox::CryptoConfigEntrySpinBox(
} else {
mNumInput->setMinimum(mKind == Int ? std::numeric_limits<int>::min() : 0);
mNumInput->setMaximum(std::numeric_limits<int>::max());
connect(mNumInput, QOverload<int>::of(&QSpinBox::valueChanged), this, &CryptoConfigEntrySpinBox::slotChanged);
connect(mNumInput, qOverload<int>(&QSpinBox::valueChanged), this, &CryptoConfigEntrySpinBox::slotChanged);
}
}
......
......@@ -147,7 +147,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog(const std::vector<Item> &recipients,
cb->addItems(prefs);
glay->addWidget(cb, row, 1);
cb->setCurrentIndex(pref2cb(it->pref));
connect(cb, QOverload<int>::of(&QComboBox::activated), this, &KeyApprovalDialog::slotPrefsChanged);
connect(cb, qOverload<int>(&QComboBox::activated), this, &KeyApprovalDialog::slotPrefsChanged);
d->preferences.push_back(cb);
}
......
......@@ -436,7 +436,7 @@ KeySelectionCombo::KeySelectionCombo(bool secretOnly, QWidget* parent)
d->proxyModel->setSourceModel(d->sortFilterProxy);
setModel(d->proxyModel);
connect(this, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(this, qOverload<int>(&QComboBox::currentIndexChanged),
this, [this](int row) {
if (row >= 0 && row < d->proxyModel->rowCount()) {
if (d->proxyModel->isCustomItem(row)) {
......@@ -510,7 +510,7 @@ void KeySelectionCombo::init()
Q_EMIT keyListingFinished();
}
connect(this, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this] () {
connect(this, qOverload<int>(&QComboBox::currentIndexChanged), this, [this] () {
setToolTip(currentData(Qt::ToolTipRole).toString());
});
}
......
......@@ -534,8 +534,8 @@ void Kleo::KeySelectionDialog::connectSignals()
if (mKeyListView->isMultiSelection()) {
connect(mKeyListView, &QTreeWidget::itemSelectionChanged, this, &KeySelectionDialog::slotSelectionChanged);
} else {
connect(mKeyListView, QOverload<KeyListViewItem*>::of(&KeyListView::selectionChanged),
this, QOverload<KeyListViewItem*>::of(&KeySelectionDialog::slotCheckSelection));
connect(mKeyListView, qOverload<KeyListViewItem*>(&KeyListView::selectionChanged),
this, qOverload<KeyListViewItem*>(&KeySelectionDialog::slotCheckSelection));
}
}
......@@ -545,8 +545,8 @@ void Kleo::KeySelectionDialog::disconnectSignals()
disconnect(mKeyListView, &QTreeWidget::itemSelectionChanged,
this, &KeySelectionDialog::slotSelectionChanged);
} else {
disconnect(mKeyListView, QOverload<KeyListViewItem*>::of(&KeyListView::selectionChanged),
this, QOverload<KeyListViewItem*>::of(&KeySelectionDialog::slotCheckSelection));
disconnect(mKeyListView, qOverload<KeyListViewItem*>(&KeyListView::selectionChanged),
this, qOverload<KeyListViewItem*>(&KeySelectionDialog::slotCheckSelection));
}
}
......
......@@ -561,7 +561,7 @@ public:
connect(combo, &KeySelectionCombo::currentKeyChanged, q, [this] () {
updateOkButton();
});
connect(combo, QOverload<int>::of(&QComboBox::currentIndexChanged), q, [this] () {
connect(combo, qOverload<int>(&QComboBox::currentIndexChanged), q, [this] () {
updateOkButton();
});
......@@ -658,7 +658,7 @@ public:
connect(combo, &KeySelectionCombo::currentKeyChanged, q, [this] () {
updateOkButton();
});
connect(combo, QOverload<int>::of(&QComboBox::currentIndexChanged), q, [this] () {
connect(combo, qOverload<int>(&QComboBox::currentIndexChanged), q, [this] () {
updateOkButton();
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment