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