Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f7cd950f authored by Laurent Montel's avatar Laurent Montel 😁

Use new connect api

parent 49cebe23
......@@ -104,9 +104,7 @@ void MailDispatcherAgent::dispatch()
mAborting = false;
mSentAnything = false;
Q_EMIT status(AgentBase::Idle, i18n("Sending canceled."));
QTimer::singleShot(3000, this, [this]() {
emitStatusReady();
});
QTimer::singleShot(3000, this, &MailDispatcherAgent::emitStatusReady);
} else {
if (mSentAnything) {
// Finished sending messages in queue.
......@@ -126,9 +124,7 @@ void MailDispatcherAgent::dispatch()
// Empty queue.
Q_EMIT status(AgentBase::Idle, i18n("No items in queue."));
}
QTimer::singleShot(3000, this, [this]() {
emitStatusReady();
});
QTimer::singleShot(3000, this, &MailDispatcherAgent::emitStatusReady);
}
mErrorOccurred = false;
......@@ -194,9 +190,7 @@ void MailDispatcherAgent::doSetOnline(bool online)
if (online) {
qCDebug(MAILDISPATCHER_LOG) << "Online. Dispatching messages.";
Q_EMIT status(AgentBase::Idle, i18n("Online, sending messages in queue."));
QTimer::singleShot(0, this, [this]() {
dispatch();
});
QTimer::singleShot(0, this, &MailDispatcherAgent::dispatch);
} else {
qCDebug(MAILDISPATCHER_LOG) << "Offline.";
Q_EMIT status(AgentBase::Idle, i18n("Offline, message sending suspended."));
......@@ -320,9 +314,7 @@ void MailDispatcherAgent::sendResult(KJob *job)
// dispatch next message
mSendingInProgress = false;
QTimer::singleShot(0, this, [this]() {
dispatch();
});
QTimer::singleShot(0, this, &MailDispatcherAgent::dispatch);
}
void MailDispatcherAgent::emitStatusReady()
......
......@@ -272,9 +272,7 @@ void OutboxQueue::localFoldersRequestResult(KJob *job)
if (++mOutboxDiscoveryRetries <= OUTBOX_DISCOVERY_RETRIES) {
const int timeout = OUTBOX_DISCOVERY_WAIT_TIME * mOutboxDiscoveryRetries;
qCWarning(MAILDISPATCHER_LOG) << "Failed to get outbox folder. Retrying in: " << timeout;
QTimer::singleShot(timeout, this, [this]() {
localFoldersChanged();
});
QTimer::singleShot(timeout, this, &OutboxQueue::localFoldersChanged);
} else {
qCWarning(MAILDISPATCHER_LOG) << "Failed to get outbox folder. Giving up.";
Q_EMIT error(i18n("Could not access the outbox folder (%1).", job->errorString()));
......
......@@ -400,9 +400,7 @@ SendJob::~SendJob()
void SendJob::start()
{
QTimer::singleShot(0, this, [this]() {
doTransport();
});
QTimer::singleShot(0, this, &SendJob::doTransport);
}
void SendJob::setMarkAborted()
......
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