Commit 6cb38350 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent 87a1fcb3
......@@ -148,7 +148,7 @@ void MailDispatcherAgent::Private::dispatch()
aborting = false;
sentAnything = false;
Q_EMIT q->status(AgentBase::Idle, i18n("Sending canceled."));
QTimer::singleShot(3000, q, SLOT(emitStatusReady()));
QTimer::singleShot(3000, q, [this]() {emitStatusReady();});
} else {
if (sentAnything) {
// Finished sending messages in queue.
......@@ -168,7 +168,7 @@ void MailDispatcherAgent::Private::dispatch()
// Empty queue.
Q_EMIT q->status(AgentBase::Idle, i18n("No items in queue."));
}
QTimer::singleShot(3000, q, SLOT(emitStatusReady()));
QTimer::singleShot(3000, q, [this]() {emitStatusReady();});
}
errorOccurred = false;
......@@ -357,7 +357,7 @@ void MailDispatcherAgent::Private::sendResult(KJob *job)
// dispatch next message
sendingInProgress = false;
QTimer::singleShot(0, q, SLOT(dispatch()));
QTimer::singleShot(0, q, [this]() { dispatch();});
}
void MailDispatcherAgent::Private::emitStatusReady()
......
......@@ -302,7 +302,7 @@ void OutboxQueue::Private::localFoldersChanged()
SpecialMailCollectionsRequestJob *job = new SpecialMailCollectionsRequestJob(q);
job->requestDefaultCollection(SpecialMailCollections::Outbox);
connect(job, SIGNAL(result(KJob*)), q, SLOT(localFoldersRequestResult(KJob*)));
connect(job, &SpecialMailCollectionsRequestJob::result, q, [this](KJob* job) {localFoldersRequestResult(job);} );
qCDebug(MAILDISPATCHER_LOG) << "Requesting outbox folder.";
job->start();
......@@ -451,7 +451,7 @@ void OutboxQueue::fetchOne()
ItemFetchJob *job = new ItemFetchJob(item);
job->fetchScope().fetchAllAttributes();
job->fetchScope().fetchFullPayload();
connect(job, SIGNAL(result(KJob*)), this, SLOT(itemFetched(KJob*)));
connect(job, &ItemFetchJob::result, this, [this](KJob *job) {d->itemFetched(job); });
}
#include "moc_outboxqueue.cpp"
......@@ -72,7 +72,7 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
new NewMailNotifierAdaptor(this);
mIdentityManager = KIdentityManagement::IdentityManager::self();
connect(mIdentityManager, SIGNAL(changed()), SLOT(slotIdentitiesChanged()));
connect(mIdentityManager, QOverload<>::of(&KIdentityManagement::IdentityManager::changed), this, &NewMailNotifierAgent::slotIdentitiesChanged);
slotIdentitiesChanged();
mDefaultPixmap = QIcon::fromTheme(QStringLiteral("kmail")).pixmap(KIconLoader::SizeMedium, KIconLoader::SizeMedium);
......
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