Commit 6392a75e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly (scripted)

parent 823fa374
Pipeline #77329 passed with stage
in 3 minutes and 42 seconds
...@@ -84,9 +84,9 @@ IdentityCombo::IdentityCombo(IdentityManager *manager, QWidget *parent) ...@@ -84,9 +84,9 @@ IdentityCombo::IdentityCombo(IdentityManager *manager, QWidget *parent)
{ {
d->reloadCombo(); d->reloadCombo();
d->reloadUoidList(); d->reloadUoidList();
connect(this, QOverload<int>::of(&IdentityCombo::activated), this, &IdentityCombo::slotEmitChanged); connect(this, qOverload<int>(&IdentityCombo::activated), this, &IdentityCombo::slotEmitChanged);
connect(this, &IdentityCombo::identityChanged, this, &IdentityCombo::slotUpdateTooltip); connect(this, &IdentityCombo::identityChanged, this, &IdentityCombo::slotUpdateTooltip);
connect(manager, QOverload<>::of(&IdentityManager::changed), this, &IdentityCombo::slotIdentityManagerChanged); connect(manager, qOverload<>(&IdentityManager::changed), this, &IdentityCombo::slotIdentityManagerChanged);
connect(manager, &IdentityManager::deleted, this, &IdentityCombo::identityDeleted); connect(manager, &IdentityManager::deleted, this, &IdentityCombo::identityDeleted);
slotUpdateTooltip(currentIdentity()); slotUpdateTooltip(currentIdentity());
} }
......
...@@ -127,15 +127,15 @@ void SignatureConfigurator::Private::init() ...@@ -127,15 +127,15 @@ void SignatureConfigurator::Private::init()
auto widgetStack = new QStackedWidget(q); auto widgetStack = new QStackedWidget(q);
widgetStack->setEnabled(false); // since !mEnableCheck->isChecked() widgetStack->setEnabled(false); // since !mEnableCheck->isChecked()
vlay->addWidget(widgetStack, 1); vlay->addWidget(widgetStack, 1);
q->connect(mSourceCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), widgetStack, &QStackedWidget::setCurrentIndex); q->connect(mSourceCombo, qOverload<int>(&QComboBox::currentIndexChanged), widgetStack, &QStackedWidget::setCurrentIndex);
q->connect(mSourceCombo, QOverload<int>::of(&QComboBox::highlighted), widgetStack, &QStackedWidget::setCurrentIndex); q->connect(mSourceCombo, qOverload<int>(&QComboBox::highlighted), widgetStack, &QStackedWidget::setCurrentIndex);
// connects for the enabling of the widgets depending on // connects for the enabling of the widgets depending on
// signatureEnabled: // signatureEnabled:
q->connect(mEnableCheck, &QCheckBox::toggled, mSourceCombo, &QComboBox::setEnabled); q->connect(mEnableCheck, &QCheckBox::toggled, mSourceCombo, &QComboBox::setEnabled);
q->connect(mEnableCheck, &QCheckBox::toggled, widgetStack, &QStackedWidget::setEnabled); q->connect(mEnableCheck, &QCheckBox::toggled, widgetStack, &QStackedWidget::setEnabled);
q->connect(mEnableCheck, &QCheckBox::toggled, label, &QLabel::setEnabled); q->connect(mEnableCheck, &QCheckBox::toggled, label, &QLabel::setEnabled);
// The focus might be still in the widget that is disabled // The focus might be still in the widget that is disabled
q->connect(mEnableCheck, &QCheckBox::clicked, mEnableCheck, QOverload<>::of(&QCheckBox::setFocus)); q->connect(mEnableCheck, &QCheckBox::clicked, mEnableCheck, qOverload<>(&QCheckBox::setFocus));
int pageno = 0; int pageno = 0;
// page 0: input field for direct entering: // page 0: input field for direct entering:
......
...@@ -19,7 +19,7 @@ public: ...@@ -19,7 +19,7 @@ public:
: QObject(parent) : QObject(parent)
, mIdentityManager(/*ro=*/true) , mIdentityManager(/*ro=*/true)
{ {
connect(&mIdentityManager, QOverload<>::of(&IdentityManager::changed), this, &IdendentitiesCache::slotIdentitiesChanged); connect(&mIdentityManager, qOverload<>(&IdentityManager::changed), this, &IdendentitiesCache::slotIdentitiesChanged);
slotIdentitiesChanged(); slotIdentitiesChanged();
} }
......
Supports Markdown
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