Commit 0ff879a9 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_EMIT

parent f7d20e2c
......@@ -133,7 +133,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
if (job->error()) {
if (retrievalJobCount == 0 && !mRequestsTracker[email].retrievalJobSuccessful) {
emit(freeBusyRetrieved(email, QString(), false, job->errorString()));
Q_EMIT(freeBusyRetrieved(email, QString(), false, job->errorString()));
}
return;
}
......@@ -183,7 +183,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
QDomElement responseElement = DavUtils::firstChildElementNS(scheduleResponse, QStringLiteral("urn:ietf:params:xml:ns:caldav"), QStringLiteral("response"));
if (responseElement.isNull()) {
if (retrievalJobCount == 0 && !mRequestsTracker[email].retrievalJobSuccessful) {
emit(freeBusyRetrieved(email, QString(), false, i18n("Invalid response from the server")));
Q_EMIT(freeBusyRetrieved(email, QString(), false, i18n("Invalid response from the server")));
}
return;
}
......@@ -194,7 +194,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
QDomElement calendarDataElement = DavUtils::firstChildElementNS(responseElement, QStringLiteral("urn:ietf:params:xml:ns:caldav"), QStringLiteral("calendar-data"));
if (calendarDataElement.isNull()) {
if (retrievalJobCount == 0 && !mRequestsTracker[email].retrievalJobSuccessful) {
emit(freeBusyRetrieved(email, QString(), false, i18n("Invalid response from the server")));
Q_EMIT(freeBusyRetrieved(email, QString(), false, i18n("Invalid response from the server")));
}
return;
}
......@@ -205,7 +205,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
KCalCore::FreeBusy::Ptr fb = format.parseFreeBusy(rawData);
if (fb.isNull()) {
if (retrievalJobCount == 0 && !mRequestsTracker[email].retrievalJobSuccessful) {
emit(freeBusyRetrieved(email, QString(), false, i18n("Unable to parse free-busy data received")));
Q_EMIT(freeBusyRetrieved(email, QString(), false, i18n("Unable to parse free-busy data received")));
}
return;
}
......
......@@ -353,7 +353,7 @@ Settings *ImapResourceBase::settings() const
bool ImapResourceBase::retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts)
{
// The collection name is empty here...
//emit status( AgentBase::Running, i18nc( "@info:status", "Retrieving item in '%1'", item.parentCollection().name() ) );
//Q_EMIT status( AgentBase::Running, i18nc( "@info:status", "Retrieving item in '%1'", item.parentCollection().name() ) );
RetrieveItemTask *task = new RetrieveItemTask(createResourceState(TaskArguments(item, parts)), this);
task->start(m_pool);
......
......@@ -532,7 +532,7 @@ void SessionPool::onIdDone(KJob *job)
KIMAP::IdJob *idJob = qobject_cast<KIMAP::IdJob *>(job);
//Can happen if we disonnected meanwhile
if (!m_connectingPool.contains(idJob->session())) {
emit connectDone(CancelledError, i18n("Disconnected during login."));
Q_EMIT connectDone(CancelledError, i18n("Disconnected during login."));
return;
}
declareSessionReady(idJob->session());
......
......@@ -105,7 +105,7 @@ ResourceStateInterface::Ptr KolabResource::createResourceState(const TaskArgumen
void KolabResource::retrieveCollections()
{
Trace();
emit status(AgentBase::Running, i18nc("@info:status", "Retrieving folders"));
Q_EMIT status(AgentBase::Running, i18nc("@info:status", "Retrieving folders"));
startTask(new KolabRetrieveCollectionsTask(createResourceState(TaskArguments()), this));
synchronizeTags();
......@@ -203,7 +203,7 @@ void KolabResource::collectionChanged(const Akonadi::Collection &collection, con
}
//TODO we need to save the collections as well if the annotations have changed
emit status(AgentBase::Running, i18nc("@info:status", "Updating folder '%1'", collection.name()));
Q_EMIT status(AgentBase::Running, i18nc("@info:status", "Updating folder '%1'", collection.name()));
ChangeCollectionTask *task = new ChangeCollectionTask(createResourceState(TaskArguments(collection, p)), this);
task->syncEnabledState(true);
startTask(task);
......
......@@ -113,7 +113,7 @@ void TagChangeHelper::onReplaceDone(KJob *job)
if (newUid > 0) {
recordNewUid(newUid, tag);
} else {
emit cancelTask(job->errorString());
Q_EMIT cancelTask(job->errorString());
}
}
......@@ -121,9 +121,9 @@ void TagChangeHelper::onModifyDone(KJob *job)
{
if (job->error()) {
qCWarning(KOLABRESOURCE_LOG) << "Modify failed: " << job->errorString();
emit cancelTask(job->errorString());
Q_EMIT cancelTask(job->errorString());
return;
}
emit changeCommitted();
Q_EMIT changeCommitted();
}
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