summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-10-01 15:22:44 +0200
committerMontel Laurent <[email protected]>2017-10-01 15:22:44 +0200
commit5cf04abe3d04df9dd9c3ce9b0b8e7368d7fe96fe (patch)
treedec022cf070bf3bb61e584f0365dc67951cd2848
parent6cb38350d07bf96f59b79d668954b687c7cdc930 (diff)
Port more code to new connect api
-rw-r--r--agents/maildispatcher/outboxqueue.cpp2
-rw-r--r--agents/maildispatcher/storeresultjob.cpp4
-rw-r--r--agents/migration/migrationscheduler.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/agents/maildispatcher/outboxqueue.cpp b/agents/maildispatcher/outboxqueue.cpp
index a147e54..8a44413 100644
--- a/agents/maildispatcher/outboxqueue.cpp
+++ b/agents/maildispatcher/outboxqueue.cpp
@@ -114,7 +114,7 @@ void OutboxQueue::Private::initQueue()
ItemFetchJob *job = new ItemFetchJob(outbox);
job->fetchScope().fetchAllAttributes();
job->fetchScope().fetchFullPayload(false);
- connect(job, SIGNAL(result(KJob*)), q, SLOT(collectionFetched(KJob*)));
+ connect(job, &ItemFetchJob::result, q, [this](KJob *job) { collectionFetched(job);});
}
void OutboxQueue::Private::addIfComplete(const Item &item)
diff --git a/agents/maildispatcher/storeresultjob.cpp b/agents/maildispatcher/storeresultjob.cpp
index 7a820ea..ed70955 100644
--- a/agents/maildispatcher/storeresultjob.cpp
+++ b/agents/maildispatcher/storeresultjob.cpp
@@ -93,7 +93,7 @@ void StoreResultJob::Private::fetchDone(KJob *job)
}
ItemModifyJob *modifyJob = new ItemModifyJob(item, q);
- QObject::connect(modifyJob, SIGNAL(result(KJob*)), q, SLOT(modifyDone(KJob*)));
+ QObject::connect(modifyJob, &ItemModifyJob::result, q, [this](KJob *job) { modifyDone(job); });
}
void StoreResultJob::Private::modifyDone(KJob *job)
@@ -125,7 +125,7 @@ void StoreResultJob::doStart()
{
// Fetch item in case it was modified elsewhere.
ItemFetchJob *job = new ItemFetchJob(d->item, this);
- connect(job, SIGNAL(result(KJob*)), this, SLOT(fetchDone(KJob*)));
+ connect(job, &ItemFetchJob::result, this, [this](KJob *job) { d->fetchDone(job); });
}
bool StoreResultJob::success() const
diff --git a/agents/migration/migrationscheduler.cpp b/agents/migration/migrationscheduler.cpp
index 78917bf..a530063 100644
--- a/agents/migration/migrationscheduler.cpp
+++ b/agents/migration/migrationscheduler.cpp
@@ -72,7 +72,7 @@ Row::Row(const QSharedPointer<MigratorBase> &migrator, MigratorModel &model)
mModel(model)
{
connect(migrator.data(), &MigratorBase::stateChanged, this, &Row::stateChanged);
- connect(migrator.data(), SIGNAL(progress(int)), this, SLOT(progress(int)));
+ connect(migrator.data(), QOverload<int>::of(&MigratorBase::progress), this, &Row::progress);
}
bool Row::operator==(const Row &other) const