Commit 1de3c884 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent d4da53b6
......@@ -209,8 +209,8 @@ MailDispatcherAgent::MailDispatcherAgent(const QString &id)
this, SLOT(queueError(QString)));
connect(this, SIGNAL(itemProcessed(Akonadi::Item,bool)),
d->queue, SLOT(itemProcessed(Akonadi::Item,bool)));
connect(this, SIGNAL(abortRequested()),
this, SLOT(abort()));
connect(this, &MailDispatcherAgent::abortRequested,
this, [this]() { d->abort(); });
d->sentActionHandler = new SentActionHandler(this);
......
......@@ -330,7 +330,7 @@ void OutboxQueue::Private::localFoldersRequestResult(KJob *job)
if (++outboxDiscoveryRetries <= OUTBOX_DISCOVERY_RETRIES) {
const int timeout = OUTBOX_DISCOVERY_WAIT_TIME * outboxDiscoveryRetries;
qCWarning(MAILDISPATCHER_LOG) << "Failed to get outbox folder. Retrying in: " << timeout;
QTimer::singleShot(timeout, q, SLOT(localFoldersChanged()));
QTimer::singleShot(timeout, q, [this]() { localFoldersChanged(); });
} else {
qCWarning(MAILDISPATCHER_LOG) << "Failed to get outbox folder. Giving up.";
Q_EMIT q->error(i18n("Could not access the outbox folder (%1).", job->errorString()));
......@@ -402,11 +402,11 @@ OutboxQueue::OutboxQueue(QObject *parent)
connect(d->monitor, SIGNAL(itemRemoved(Akonadi::Item)),
this, SLOT(itemRemoved(Akonadi::Item)));
connect(SpecialMailCollections::self(), SIGNAL(defaultCollectionsChanged()), this, SLOT(localFoldersChanged()));
connect(SpecialMailCollections::self(), &SpecialMailCollections::defaultCollectionsChanged, this, [this]() { d->localFoldersChanged(); });
d->localFoldersChanged();
d->futureTimer = new QTimer(this);
connect(d->futureTimer, SIGNAL(timeout()), this, SLOT(checkFuture()));
connect(d->futureTimer, &QTimer::timeout, this, [this]() { d->checkFuture(); });
d->futureTimer->start(60 * 60 * 1000); // 1 hour
}
......
......@@ -444,7 +444,7 @@ SendJob::~SendJob()
void SendJob::start()
{
QTimer::singleShot(0, this, SLOT(doTransport()));
QTimer::singleShot(0, this, [this]() { d->doTransport(); });
}
void SendJob::setMarkAborted()
......
......@@ -84,9 +84,6 @@ void RetrieveItemTask::triggerFetchJob()
fetch->setScope(scope);
connect(fetch, &KIMAP::FetchJob::messagesAvailable,
this, &RetrieveItemTask::onMessagesReceived);
//TODO: Handle parts retrieval
//connect( fetch, SIGNAL(partsReceived(QString,QMap<qint64,qint64>,QMap<qint64,KIMAP::MessageParts>)),
// this, SLOT(onPartsReceived(QString,QMap<qint64,qint64>,QMap<qint64,KIMAP::MessageParts>)) );
connect(fetch, &KJob::result,
this, &RetrieveItemTask::onContentFetchDone);
fetch->start();
......
......@@ -106,7 +106,7 @@ QDialog *KolabResource::createConfigureDialog(WId windowId)
KWindowSystem::setMainWindow(dlg, windowId);
dlg->setWindowTitle(i18n("Kolab Account Settings"));
dlg->setWindowIcon(QIcon::fromTheme(QStringLiteral("kolab")));
connect(dlg, SIGNAL(finished(int)), this, SLOT(onConfigurationDone(int)));
connect(dlg, &QDialog::finished, this, &KolabResource::onConfigurationDone);
return dlg;
}
......
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