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 e67cab08 authored by Laurent Montel's avatar Laurent Montel 😁

Port to new connect api

parent b03890a9
......@@ -49,6 +49,6 @@ InspectableMonitor::InspectableMonitor(FakeMonitorDependeciesFactory *dependenci
connect(this, SIGNAL(collectionSubscribed(Akonadi::Collection,Akonadi::Collection)), SIGNAL(dummySignal()));
connect(this, SIGNAL(collectionUnsubscribed(Akonadi::Collection)), SIGNAL(dummySignal()));
QTimer::singleShot(0, this, SLOT(doConnectToNotificationManager()));
QTimer::singleShot(0, this, [this]() { doConnectToNotificationManager(); });
}
......@@ -94,7 +94,7 @@ SubscriptionModel::SubscriptionModel(QObject *parent) :
{
includeUnsubscribed();
CollectionFetchJob *job = new CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive, this);
connect(job, SIGNAL(result(KJob*)), this, SLOT(listResult(KJob*)));
connect(job,&CollectionFetchJob::result, this, [this](KJob *job) { d->listResult(job); });
}
SubscriptionModel::~SubscriptionModel()
......
......@@ -59,7 +59,7 @@ public:
SubscriptionJob *job = new SubscriptionJob(q);
job->subscribe(model->subscribed());
job->unsubscribe(model->unsubscribed());
connect(job, SIGNAL(result(KJob*)), q, SLOT(subscriptionResult(KJob*)));
connect(job, &SubscriptionJob::result, q, [this](KJob *job) { subscriptionResult(job); });
}
void subscriptionResult(KJob *job)
......
......@@ -93,7 +93,7 @@ void XmlWriteJobPrivate::processCollection()
qDebug() << "Writing " << current.name() << "into" << elementStack.top().attribute(QStringLiteral("name"));
elementStack.push(XmlWriter::writeCollection(current, elementStack.top()));
CollectionFetchJob *subfetch = new CollectionFetchJob(current, CollectionFetchJob::FirstLevel, q);
q->connect(subfetch, SIGNAL(result(KJob*)), q, SLOT(collectionFetchResult(KJob*)));
q->connect(subfetch, &CollectionFetchJob::result, q, [this](KJob *job) {collectionFetchResult(job); });
}
void XmlWriteJobPrivate::processItems()
......@@ -102,7 +102,7 @@ void XmlWriteJobPrivate::processItems()
ItemFetchJob *fetch = new ItemFetchJob(collection, q);
fetch->fetchScope().fetchAllAttributes();
fetch->fetchScope().fetchFullPayload();
q->connect(fetch, SIGNAL(result(KJob*)), q, SLOT(itemFetchResult(KJob*)));
q->connect(fetch, &ItemFetchJob::result, q, [this](KJob *job) { itemFetchResult(job); } );
}
void XmlWriteJobPrivate::itemFetchResult(KJob *job)
......@@ -146,7 +146,7 @@ void XmlWriteJob::doStart()
{
d->elementStack.push(d->document.document().documentElement());
CollectionFetchJob *job = new CollectionFetchJob(d->roots, this);
connect(job, SIGNAL(result(KJob*)), SLOT(collectionFetchResult(KJob*)));
connect(job, &CollectionFetchJob::result, this, [this](KJob *job) {d->collectionFetchResult(job);});
}
void XmlWriteJob::done() // cannot be in the private class due to emitResult()
......
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