Commit 0cfb501d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use qOverload directly (scripted)

parent 00334d58
Pipeline #77310 passed with stage
in 10 minutes and 21 seconds
......@@ -14,7 +14,7 @@
ButtonGroup::ButtonGroup(QObject* parent)
: QButtonGroup(parent)
{
connect(this, QOverload<QAbstractButton*>::of(&QButtonGroup::buttonClicked), this, &ButtonGroup::buttonSet);
connect(this, qOverload<QAbstractButton*>(&QButtonGroup::buttonClicked), this, &ButtonGroup::buttonSet);
}
/******************************************************************************
......
......@@ -162,7 +162,7 @@ MessageNotification::MessageNotification(const KAEvent& event, const KAAlarm& al
if (!(flags & NoInitView))
MessageNotification::setUpDisplay(); // avoid calling virtual method from constructor
connect(this, QOverload<unsigned int>::of(&KNotification::activated), this, &MessageNotification::buttonActivated);
connect(this, qOverload<unsigned int>(&KNotification::activated), this, &MessageNotification::buttonActivated);
connect(this, &KNotification::closed, this, &MessageNotification::slotClosed);
connect(mHelper, &MessageDisplayHelper::textsChanged, this, &MessageNotification::textsChanged);
connect(mHelper, &MessageDisplayHelper::commandExited, this, &MessageNotification::commandCompleted);
......@@ -185,7 +185,7 @@ MessageNotification::MessageNotification(const KAEvent& event, const DateTime& a
setWidget(MainWindow::mainMainWindow());
MessageNotification::setUpDisplay(); // avoid calling virtual method from constructor
connect(this, QOverload<unsigned int>::of(&KNotification::activated), this, &MessageNotification::buttonActivated);
connect(this, qOverload<unsigned int>(&KNotification::activated), this, &MessageNotification::buttonActivated);
connect(this, &KNotification::closed, this, &MessageNotification::slotClosed);
connect(mHelper, &MessageDisplayHelper::textsChanged, this, &MessageNotification::textsChanged);
......@@ -205,7 +205,7 @@ MessageNotification::MessageNotification(const QString& eventId, MessageDisplayH
MNSessionManager::create();
setWidget(MainWindow::mainMainWindow());
connect(this, QOverload<unsigned int>::of(&KNotification::activated), this, &MessageNotification::buttonActivated);
connect(this, qOverload<unsigned int>(&KNotification::activated), this, &MessageNotification::buttonActivated);
connect(this, &KNotification::closed, this, &MessageNotification::slotClosed);
connect(mHelper, &MessageDisplayHelper::textsChanged, this, &MessageNotification::textsChanged);
connect(mHelper, &MessageDisplayHelper::commandExited, this, &MessageNotification::commandCompleted);
......
......@@ -252,7 +252,7 @@ DirResourceImportTypeWidget::DirResourceImportTypeWidget(CalEvent::Type alarmTyp
mUi->statusLabel->setText(QString());
mUi->pathRequester->setFocus();
mUi->pathRequester->installEventFilter(this);
connect(mUi->pathRequester, QOverload<const QString &>::of(&KUrlRequester::returnPressed), this, [this]() { validate(); });
connect(mUi->pathRequester, qOverload<const QString &>(&KUrlRequester::returnPressed), this, [this]() { validate(); });
connect(mUi->pathRequester, &KUrlRequester::urlSelected, this, [this]() { validate(); });
connect(mUi->pathRequester, &KUrlRequester::textChanged, this, [this]() { setStatus(false); });
connect(mUi->nameText, &QLineEdit::textChanged, this, [this]() { validate(); });
......
......@@ -116,11 +116,11 @@ TrayWindow::TrayWindow(MainWindow* parent)
// Update when alarms are modified
AlarmListModel* all = DataModel::allAlarmListModel();
connect(all, &QAbstractItemModel::dataChanged, mToolTipUpdateTimer, QOverload<>::of(&QTimer::start));
connect(all, &QAbstractItemModel::rowsInserted, mToolTipUpdateTimer, QOverload<>::of(&QTimer::start));
connect(all, &QAbstractItemModel::rowsMoved, mToolTipUpdateTimer, QOverload<>::of(&QTimer::start));
connect(all, &QAbstractItemModel::rowsRemoved, mToolTipUpdateTimer, QOverload<>::of(&QTimer::start));
connect(all, &QAbstractItemModel::modelReset, mToolTipUpdateTimer, QOverload<>::of(&QTimer::start));
connect(all, &QAbstractItemModel::dataChanged, mToolTipUpdateTimer, qOverload<>(&QTimer::start));
connect(all, &QAbstractItemModel::rowsInserted, mToolTipUpdateTimer, qOverload<>(&QTimer::start));
connect(all, &QAbstractItemModel::rowsMoved, mToolTipUpdateTimer, qOverload<>(&QTimer::start));
connect(all, &QAbstractItemModel::rowsRemoved, mToolTipUpdateTimer, qOverload<>(&QTimer::start));
connect(all, &QAbstractItemModel::modelReset, mToolTipUpdateTimer, qOverload<>(&QTimer::start));
// Set auto-hide status when next alarm or preferences change
mStatusUpdateTimer->setSingleShot(true);
......@@ -130,7 +130,7 @@ TrayWindow::TrayWindow(MainWindow* parent)
updateStatus();
// Update when tooltip preferences are modified
Preferences::connect(&Preferences::tooltipPreferencesChanged, mToolTipUpdateTimer, QOverload<>::of(&QTimer::start));
Preferences::connect(&Preferences::tooltipPreferencesChanged, mToolTipUpdateTimer, qOverload<>(&QTimer::start));
}
TrayWindow::~TrayWindow()
......
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