Commit 9d9e41d8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: Use QT_NO_KEYWORDS. It will be the default in qt6

parent ae3c8ecd
......@@ -65,6 +65,7 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
endif()
add_definitions(-DQT_NO_FOREACH)
add_definitions(-DQT_NO_KEYWORDS)
add_subdirectory(src)
add_subdirectory(serializers)
......
......@@ -189,7 +189,7 @@ void CalendarBasePrivate::collectionFetchResult(KJob *job)
mCollections.insert(collection.id(), collection);
if (mCollectionJobs.isEmpty()) {
emit fetchFinished();
Q_EMIT fetchFinished();
}
}
......@@ -252,7 +252,7 @@ void CalendarBasePrivate::slotDeleteFinished(int changeId, const QVector<Akonadi
}
}
emit q->deleteFinished(resultCode == IncidenceChanger::ResultCodeSuccess, errorMessage);
Q_EMIT q->deleteFinished(resultCode == IncidenceChanger::ResultCodeSuccess, errorMessage);
}
void CalendarBasePrivate::slotCreateFinished(int changeId, const Akonadi::Item &item, IncidenceChanger::ResultCode resultCode, const QString &errorMessage)
......@@ -267,7 +267,7 @@ void CalendarBasePrivate::slotCreateFinished(int changeId, const Akonadi::Item &
mLastCreationCancelled = (resultCode == IncidenceChanger::ResultCodeUserCanceled);
emit q->createFinished(resultCode == IncidenceChanger::ResultCodeSuccess, errorMessage);
Q_EMIT q->createFinished(resultCode == IncidenceChanger::ResultCodeSuccess, errorMessage);
}
void CalendarBasePrivate::slotModifyFinished(int changeId, const Akonadi::Item &item, IncidenceChanger::ResultCode resultCode, const QString &errorMessage)
......@@ -290,7 +290,7 @@ void CalendarBasePrivate::slotModifyFinished(int changeId, const Akonadi::Item &
resultCode = IncidenceChanger::ResultCodeAlreadyDeleted;
}
}
emit q->modifyFinished(resultCode == IncidenceChanger::ResultCodeSuccess, message);
Q_EMIT q->modifyFinished(resultCode == IncidenceChanger::ResultCodeSuccess, message);
}
void CalendarBasePrivate::handleUidChange(const Akonadi::Item &oldItem, const Akonadi::Item &newItem, const QString &newIdentifier)
......
......@@ -82,12 +82,12 @@ void CalendarClipboard::Private::cut(const KCalendarCore::Incidence::List &incid
Akonadi::Item::List items = m_calendar->itemList(incidences);
const int result = m_changer->deleteIncidences(items);
if (result == -1) {
emit q->cutFinished(/**success=*/ false, i18n("Error performing deletion."));
Q_EMIT q->cutFinished(/**success=*/ false, i18n("Error performing deletion."));
} else {
m_pendingChangeIds << result;
}
} else {
emit q->cutFinished(/**success=*/ false, i18n("Error performing copy."));
Q_EMIT q->cutFinished(/**success=*/ false, i18n("Error performing copy."));
}
}
......@@ -111,7 +111,7 @@ void CalendarClipboard::Private::makeChildsIndependent(const KCalendarCore::Inci
for (const KCalendarCore::Incidence::Ptr &child : childs) {
Akonadi::Item childItem = m_calendar->item(incidence);
if (!childItem.isValid()) {
emit q->cutFinished(/**success=*/ false, i18n("Can't find item: %1", childItem.id()));
Q_EMIT q->cutFinished(/**success=*/ false, i18n("Can't find item: %1", childItem.id()));
return;
}
......@@ -127,7 +127,7 @@ void CalendarClipboard::Private::makeChildsIndependent(const KCalendarCore::Inci
}
}
if (m_pendingChangeIds.isEmpty() && m_abortCurrentOperation) {
emit q->cutFinished(/**success=*/ false, i18n("Error while removing relations."));
Q_EMIT q->cutFinished(/**success=*/ false, i18n("Error while removing relations."));
} // if m_pendingChangeIds isn't empty, we wait for all jobs to finish first.
}
}
......@@ -144,7 +144,7 @@ void CalendarClipboard::Private::slotModifyFinished(int changeId, const Akonadi:
Q_UNUSED(item);
Q_UNUSED(errorMessage);
if (m_abortCurrentOperation && isLastChange) {
emit q->cutFinished(/**success=*/ false, i18n("Error while removing relations."));
Q_EMIT q->cutFinished(/**success=*/ false, i18n("Error while removing relations."));
} else if (!m_abortCurrentOperation) {
if (resultCode == IncidenceChanger::ResultCodeSuccess) {
if (isLastChange) {
......@@ -168,9 +168,9 @@ void CalendarClipboard::Private::slotDeleteFinished(int changeId, const QVector<
Q_UNUSED(ids);
if (result == IncidenceChanger::ResultCodeSuccess) {
emit q->cutFinished(/**success=*/ true, QString());
Q_EMIT q->cutFinished(/**success=*/ true, QString());
} else {
emit q->cutFinished(/**success=*/ false, i18n("Error while deleting incidences: %1",
Q_EMIT q->cutFinished(/**success=*/ false, i18n("Error while deleting incidences: %1",
errorMessage));
}
}
......@@ -200,7 +200,7 @@ void CalendarClipboard::cutIncidence(const KCalendarCore::Incidence::Ptr &incide
KGuiItem(i18n("Cut All")));
if (km == KMessageBox::Cancel) {
emit cutFinished(/*success=*/ true, QString());
Q_EMIT cutFinished(/*success=*/ true, QString());
return;
}
mode = km == KMessageBox::Yes ? SingleMode : RecursiveMode;
......
......@@ -137,7 +137,7 @@ void ETMCalendarPrivate::onCollectionChanged(const Akonadi::Collection &collecti
}
}
emit q->collectionChanged(collection, attributeNames);
Q_EMIT q->collectionChanged(collection, attributeNames);
}
void ETMCalendarPrivate::setupFilteredETM()
......@@ -296,7 +296,7 @@ void ETMCalendarPrivate::itemsAdded(const Akonadi::Item::List &items)
if (mPopulatedCollectionIds.contains(id)) {
// If the collection isn't populated yet, it will be sent later
// Saves some cpu cycles
emit q->calendarChanged();
Q_EMIT q->calendarChanged();
}
}
}
......@@ -306,7 +306,7 @@ void ETMCalendarPrivate::itemsRemoved(const Akonadi::Item::List &items)
for (const Akonadi::Item &item : items) {
internalRemove(item);
}
emit q->calendarChanged();
Q_EMIT q->calendarChanged();
}
Akonadi::Collection ETMCalendarPrivate::collectionFromIndex(const QModelIndex &index)
......@@ -324,14 +324,14 @@ void ETMCalendarPrivate::onRowsInserted(const QModelIndex &index, int start, int
}
if (!collections.isEmpty()) {
emit q->collectionsAdded(collections);
Q_EMIT q->collectionsAdded(collections);
}
}
void ETMCalendarPrivate::onCollectionPopulated(Akonadi::Collection::Id id)
{
mPopulatedCollectionIds.insert(id);
emit q->calendarChanged();
Q_EMIT q->calendarChanged();
}
void ETMCalendarPrivate::onRowsRemoved(const QModelIndex &index, int start, int end)
......@@ -342,7 +342,7 @@ void ETMCalendarPrivate::onRowsRemoved(const QModelIndex &index, int start, int
}
if (!collections.isEmpty()) {
emit q->collectionsRemoved(collections);
Q_EMIT q->collectionsRemoved(collections);
}
}
......@@ -398,7 +398,7 @@ void ETMCalendarPrivate::onDataChangedInFilteredModel(const QModelIndex &topLeft
i = i.sibling(row, topLeft.column());
}
emit q->calendarChanged();
Q_EMIT q->calendarChanged();
}
void ETMCalendarPrivate::updateItem(const Akonadi::Item &item)
......
......@@ -74,7 +74,7 @@ void FetchJobCalendarPrivate::slotSearchJobFinished(KJob *job)
void FetchJobCalendarPrivate::slotFetchJobFinished()
{
m_isLoaded = true;
// emit loadFinished() in a delayed manner, due to freezes because of execs.
// Q_EMIT loadFinished() in a delayed manner, due to freezes because of execs.
QMetaObject::invokeMethod(q, "loadFinished", Qt::QueuedConnection,
Q_ARG(bool, m_success), Q_ARG(QString, m_errorMessage));
}
......
......@@ -210,7 +210,7 @@ void FreeBusyManagerPrivate::fetchFreeBusyUrl(const QString &email)
cachedUrl.setUserName(CalendarSettings::self()->freeBusyRetrieveUser());
cachedUrl.setPassword(CalendarSettings::self()->freeBusyRetrievePassword());
}
emit freeBusyUrlRetrieved(email, replaceVariablesUrl(cachedUrl, email));
Q_EMIT freeBusyUrlRetrieved(email, replaceVariablesUrl(cachedUrl, email));
return;
}
// Try with the url configured by preferred email in kcontactmanager
......@@ -228,7 +228,7 @@ void FreeBusyManagerPrivate::contactSearchJobFinished(KJob *_job)
if (_job->error()) {
qCritical() << "Error while searching for contact: "
<< _job->errorString() << ", email = " << email;
emit freeBusyUrlRetrieved(email, QUrl());
Q_EMIT freeBusyUrlRetrieved(email, QUrl());
return;
}
......@@ -246,7 +246,7 @@ void FreeBusyManagerPrivate::contactSearchJobFinished(KJob *_job)
qCDebug(AKONADICALENDAR_LOG) << "Preferred email of" << email << "is" << pref;
if (!url.isEmpty()) {
qCDebug(AKONADICALENDAR_LOG) << "Taken url from preferred email:" << url;
emit freeBusyUrlRetrieved(email, replaceVariablesUrl(QUrl(url), email));
Q_EMIT freeBusyUrlRetrieved(email, replaceVariablesUrl(QUrl(url), email));
return;
}
}
......@@ -255,7 +255,7 @@ void FreeBusyManagerPrivate::contactSearchJobFinished(KJob *_job)
if (!CalendarSettings::self()->freeBusyRetrieveAuto()) {
// No, so no FB list here
qCDebug(AKONADICALENDAR_LOG) << "No automatic retrieving";
emit freeBusyUrlRetrieved(email, QUrl());
Q_EMIT freeBusyUrlRetrieved(email, QUrl());
return;
}
......@@ -264,7 +264,7 @@ void FreeBusyManagerPrivate::contactSearchJobFinished(KJob *_job)
int emailpos = email.indexOf(QLatin1Char('@'));
if (emailpos == -1) {
qCWarning(AKONADICALENDAR_LOG) << "No '@' found in" << email;
emit freeBusyUrlRetrieved(email, QUrl());
Q_EMIT freeBusyUrlRetrieved(email, QUrl());
return;
}
......@@ -280,7 +280,7 @@ void FreeBusyManagerPrivate::contactSearchJobFinished(KJob *_job)
&& !emailHost.endsWith(QLatin1Char('.') + hostDomain)) {
// Host names do not match
qCDebug(AKONADICALENDAR_LOG) << "Host '" << hostDomain << "' doesn't match email '" << email << '\'';
emit freeBusyUrlRetrieved(email, QUrl());
Q_EMIT freeBusyUrlRetrieved(email, QUrl());
return;
}
}
......@@ -298,7 +298,7 @@ void FreeBusyManagerPrivate::contactSearchJobFinished(KJob *_job)
// no need to cache this URL as this is pretty fast to get from the config value.
// return the fullpath URL
qCDebug(AKONADICALENDAR_LOG) << "Found url. email=" << email << "; url=" << fullpathURL;
emit freeBusyUrlRetrieved(email, fullpathURL);
Q_EMIT freeBusyUrlRetrieved(email, fullpathURL);
return;
}
......@@ -347,10 +347,10 @@ void FreeBusyManagerPrivate::fbCheckerJobFinished(KJob *job)
KConfigGroup group = cfg.group(email);
group.writeEntry("url", dirURL.toDisplayString()); // prettyURL() does not write user nor password
qCDebug(AKONADICALENDAR_LOG) << "Found url email=" << email << "; url=" << dirURL;
emit freeBusyUrlRetrieved(email, dirURL);
Q_EMIT freeBusyUrlRetrieved(email, dirURL);
} else {
qCDebug(AKONADICALENDAR_LOG) << "Returning invalid url";
emit freeBusyUrlRetrieved(email, QUrl());
Q_EMIT freeBusyUrlRetrieved(email, QUrl());
}
}
......@@ -418,7 +418,7 @@ void FreeBusyManagerPrivate::processFreeBusyDownloadResult(KJob *_job)
fb->setOrganizer(p);
q->saveFreeBusy(fb, p);
qCDebug(AKONADICALENDAR_LOG) << "Freebusy retrieved for " << email;
emit q->freeBusyRetrieved(fb, email);
Q_EMIT q->freeBusyRetrieved(fb, email);
} else {
qCritical() << "Error downloading freebusy, invalid fb.";
KMessageBox::sorry(
......@@ -700,7 +700,7 @@ void FreeBusyManagerPrivate::onFreeBusyRetrieved(const QString &email, const QSt
if (queue->mHandlersCount == 0) {
fetchFreeBusyUrl(email);
} else {
emit q->freeBusyRetrieved(queue->mResultingFreeBusy, email);
Q_EMIT q->freeBusyRetrieved(queue->mResultingFreeBusy, email);
}
mProvidersRequestsByEmail.remove(email);
}
......@@ -923,7 +923,7 @@ bool FreeBusyManager::retrieveFreeBusy(const QString &email, bool forceDownload,
if (Akonadi::CalendarUtils::thatIsMe(email)) {
// Don't download our own free-busy list from the net
qCDebug(AKONADICALENDAR_LOG) << "freebusy of owner, not downloading";
emit freeBusyRetrieved(d->ownerFreeBusy(), email);
Q_EMIT freeBusyRetrieved(d->ownerFreeBusy(), email);
return true;
}
......@@ -931,7 +931,7 @@ bool FreeBusyManager::retrieveFreeBusy(const QString &email, bool forceDownload,
KCalendarCore::FreeBusy::Ptr fb = loadFreeBusy(email);
if (fb) {
qCDebug(AKONADICALENDAR_LOG) << "Found a cached copy for " << email;
emit freeBusyRetrieved(fb, email);
Q_EMIT freeBusyRetrieved(fb, email);
return true;
}
......@@ -945,7 +945,7 @@ bool FreeBusyManager::retrieveFreeBusy(const QString &email, bool forceDownload,
if (d->mRetrieveQueue.count() > 1) {
// TODO: true should always emit
qCWarning(AKONADICALENDAR_LOG) << "Returning true without emit, is this correct?";
qCWarning(AKONADICALENDAR_LOG) << "Returning true without Q_EMIT, is this correct?";
return true;
}
......
......@@ -63,12 +63,12 @@ FreeBusyProviderBase::~FreeBusyProviderBase()
void FreeBusyProviderBase::handlesFreeBusy(const QString &email, bool handles) const
{
emit d->handlesFreeBusy(email, handles);
Q_EMIT d->handlesFreeBusy(email, handles);
}
void FreeBusyProviderBase::freeBusyRetrieved(const QString &email, const QString &freeBusy, bool success, const QString &errorText)
{
emit d->freeBusyRetrieved(email, freeBusy, success, errorText);
Q_EMIT d->freeBusyRetrieved(email, freeBusy, success, errorText);
}
#include "moc_freebusyproviderbase_p.cpp"
......@@ -151,7 +151,7 @@ bool History::clear()
} else {
result = false;
}
emit changed();
Q_EMIT changed();
return result;
}
......@@ -186,7 +186,7 @@ void History::Private::updateIds(Item::Id oldId, Item::Id newId)
void History::Private::doIt(OperationType type)
{
mOperationTypeInProgress = type;
emit q->changed(); // Application will disable undo/redo buttons because operation is in progress
Q_EMIT q->changed(); // Application will disable undo/redo buttons because operation is in progress
Q_ASSERT(!stack().isEmpty());
mEntryInProgress = stack().pop();
......@@ -226,7 +226,7 @@ void History::Private::handleFinished(IncidenceChanger::ResultCode changerResult
emitDone(mOperationTypeInProgress, resultCode);
mOperationTypeInProgress = TypeNone;
emit q->changed();
Q_EMIT q->changed();
}
void History::Private::stackEntry(const Entry::Ptr &entry, uint atomicOperationId)
......@@ -264,7 +264,7 @@ void History::Private::stackEntry(const Entry::Ptr &entry, uint atomicOperationI
mUndoStack.push(entryToPush);
}
mRedoStack.clear();
emit q->changed();
Q_EMIT q->changed();
} else {
if (entryToPush) {
mQueuedEntries.append(entryToPush);
......@@ -324,9 +324,9 @@ QStack<Entry::Ptr> &History::Private::destinationStack()
void History::Private::emitDone(OperationType type, History::ResultCode resultCode)
{
if (type == TypeUndo) {
emit q->undone(resultCode);
Q_EMIT q->undone(resultCode);
} else if (type == TypeRedo) {
emit q->redone(resultCode);
Q_EMIT q->redone(resultCode);
} else {
Q_ASSERT(false);
}
......
......@@ -81,7 +81,7 @@ void Entry::doIt(OperationType type)
}
if (!result) {
emit finished(IncidenceChanger::ResultCodeJobError, i18n("General error"));
Q_EMIT finished(IncidenceChanger::ResultCodeJobError, i18n("General error"));
}
}
......@@ -134,7 +134,7 @@ void CreationEntry::onDeleteFinished(int changeId, const QVector<Akonadi::Item::
Q_ASSERT(deletedIds.count() == 1);
mLatestRevisionByItemId.remove(deletedIds.first()); // TODO
}
emit finished(resultCode, errorString);
Q_EMIT finished(resultCode, errorString);
}
}
......@@ -151,7 +151,7 @@ void CreationEntry::onCreateFinished(int changeId, const Akonadi::Item &item, Ak
}
updateIdsGlobaly(mItems.first().id(), item.id());
}
emit finished(resultCode, errorString);
Q_EMIT finished(resultCode, errorString);
}
}
......@@ -214,7 +214,7 @@ void DeletionEntry::onDeleteFinished(int changeId, const QVector<Akonadi::Item::
mLatestRevisionByItemId.remove(id); // TODO
}
}
emit finished(resultCode, errorString);
Q_EMIT finished(resultCode, errorString);
}
}
......@@ -231,7 +231,7 @@ void DeletionEntry::onCreateFinished(int changeId, const Akonadi::Item &item, Ak
--mNumPendingCreations;
mOldIdByChangeId.remove(changeId);
if (mNumPendingCreations == 0) {
emit finished(mResultCode, mErrorString);
Q_EMIT finished(mResultCode, mErrorString);
}
}
}
......@@ -282,7 +282,7 @@ void ModificationEntry::onModifyFinished(int changeId, const Akonadi::Item &item
if (resultCode == IncidenceChanger::ResultCodeSuccess) {
mLatestRevisionByItemId.insert(item.id(), item.revision());
}
emit finished(resultCode, errorString);
Q_EMIT finished(resultCode, errorString);
}
}
......@@ -349,6 +349,6 @@ void MultiEntry::onEntryFinished(Akonadi::IncidenceChanger::ResultCode resultCod
&& resultCode != IncidenceChanger::ResultCodeSuccess)) {
mFinishedEntries = mEntries.count(); // we're done
mOperationInProgress = TypeNone;
emit finished(resultCode, errorString);
Q_EMIT finished(resultCode, errorString);
}
}
......@@ -73,10 +73,10 @@ void ICalImporter::Private::onIncidenceCreated(int changeId, const Akonadi::Item
m_working = false;
setErrorMessage(errorString);
m_pendingRequests.clear();
emit q->importIntoExistingFinished(false, m_numIncidences);
Q_EMIT q->importIntoExistingFinished(false, m_numIncidences);
} else if (m_pendingRequests.isEmpty()) {
m_working = false;
emit q->importIntoExistingFinished(true, m_numIncidences);
Q_EMIT q->importIntoExistingFinished(true, m_numIncidences);
}
}
......@@ -95,7 +95,7 @@ void ICalImporter::Private::resourceCreated(KJob *job)
m_working = false;
if (createjob->error()) {
setErrorMessage(i18n("Error creating ical resource: %1", createjob->errorString()));
emit q->importIntoNewFinished(false);
Q_EMIT q->importIntoNewFinished(false);
return;
}
......@@ -107,7 +107,7 @@ void ICalImporter::Private::resourceCreated(KJob *job)
QDBusInterface iface(service, QStringLiteral("/Settings"));
if (!iface.isValid()) {
setErrorMessage(i18n("Failed to obtain D-Bus interface for remote configuration."));
emit q->importIntoNewFinished(false);
Q_EMIT q->importIntoNewFinished(false);
return;
}
......@@ -117,7 +117,7 @@ void ICalImporter::Private::resourceCreated(KJob *job)
iface.call(QStringLiteral("setPath"), path);
instance.reconfigure();
emit q->importIntoNewFinished(true);
Q_EMIT q->importIntoNewFinished(true);
}
void ICalImporter::Private::remoteDownloadFinished(KIO::Job *job, const QByteArray &data)
......@@ -131,7 +131,7 @@ void ICalImporter::Private::remoteDownloadFinished(KIO::Job *job, const QByteArr
q->importIntoExistingResource(QUrl(m_temporaryFile->fileName()), m_collection);
} else {
setErrorMessage(i18n("Could not download remote file."));
emit q->importIntoExistingFinished(false, 0);
Q_EMIT q->importIntoExistingFinished(false, 0);
}
}
......
......@@ -32,12 +32,12 @@ using namespace Akonadi;
void Change::emitUserDialogClosedAfterChange(Akonadi::ITIPHandlerHelper::SendResult status)
{
emit dialogClosedAfterChange(id, status);
Q_EMIT dialogClosedAfterChange(id, status);
}
void Change::emitUserDialogClosedBeforeChange(Akonadi::ITIPHandlerHelper::SendResult status)
{
emit dialogClosedBeforeChange(id, status);
Q_EMIT dialogClosedBeforeChange(id, status);
}
void IncidenceChanger::Private::loadCollections()
......
......@@ -342,7 +342,7 @@ void ITIPHandler::publishInformation(const KCalendarCore::Incidence::Ptr &incide
d->m_scheduler->publish(incidence, publishdlg->addresses());
} else {
d->m_currentOperation = OperationNone;
emit informationPublished(ResultSuccess, QString()); // Canceled.
Q_EMIT informationPublished(ResultSuccess, QString()); // Canceled.
}
delete publishdlg;
}
......
......@@ -77,7 +77,7 @@ void ITIPHandler::Private::onHelperFinished(Akonadi::ITIPHandlerHelper::SendResu
MailScheduler::Result result2 = success ? MailScheduler::ResultSuccess : MailScheduler::ResultGenericError;
finishProcessiTIPMessage(result2, i18n("Error: %1", errorMessage));
} else {
emit q->iTipMessageSent(success ? ResultSuccess : ResultError,
Q_EMIT q->iTipMessageSent(success ? ResultSuccess : ResultError,
success ? QString() : i18n("Error: %1", errorMessage));
}
}
......@@ -100,7 +100,7 @@ void ITIPHandler::Private::onLoadFinished(bool success, const QString &errorMess
m_queuedInvitation.iCal,
m_queuedInvitation.action);
} else {
emit q->iTipMessageProcessed(ResultError, i18n("Error loading calendar: %1", errorMessage));
Q_EMIT q->iTipMessageProcessed(ResultError, i18n("Error loading calendar: %1", errorMessage));
}
} else if (m_currentOperation == OperationSendiTIPMessage) {
q->sendiTIPMessage(m_queuedInvitation.method,
......@@ -115,7 +115,7 @@ void ITIPHandler::Private::finishProcessiTIPMessage(Akonadi::MailScheduler::Resu
{
// Handle when user cancels on the collection selection dialog
if (result == MailScheduler::ResultUserCancelled) {
emit q->iTipMessageProcessed(ResultCancelled, QString());
Q_EMIT q->iTipMessageProcessed(ResultCancelled, QString());
return;
}
......@@ -138,7 +138,7 @@ void ITIPHandler::Private::finishProcessiTIPMessage(Akonadi::MailScheduler::Resu
}
}
emit q->iTipMessageProcessed(success ? ResultSuccess : ResultError,
Q_EMIT q->iTipMessageProcessed(success ? ResultSuccess : ResultError,
success ? QString() : i18n("Error: %1", errorMessage));
}
......@@ -146,7 +146,7 @@ void ITIPHandler::Private::onHelperModifyDialogClosed(ITIPHandlerHelper::SendRes
{
if (sendResult == ITIPHandlerHelper::ResultNoSendingNeeded
|| sendResult == ITIPHandlerHelper::ResultCanceled) {
emit q->iTipMessageSent(ResultSuccess, QString());
Q_EMIT q->iTipMessageSent(ResultSuccess, QString());
}
}
......@@ -162,7 +162,7 @@ void ITIPHandler::Private::finishSendiTIPMessage(Akonadi::MailScheduler::Result
i18n("Sending Free/Busy"),
QStringLiteral("FreeBusyPublishSuccess"));
}
emit q->iTipMessageSent(ITIPHandler::ResultSuccess, QString());
Q_EMIT q->iTipMessageSent(ITIPHandler::ResultSuccess, QString());
} else {
const QString error = i18nc("Groupware message sending failed. "
"%2 is request/reply/add/cancel/counter/etc.",
......@@ -173,7 +173,7 @@ void ITIPHandler::Private::finishSendiTIPMessage(Akonadi::MailScheduler::Result
KMessageBox::error(m_parentWidget, error);
}
qCritical() << "Groupware message sending failed." << error << errorMessage;
emit q->iTipMessageSent(ITIPHandler::ResultError, error + errorMessage);
Q_EMIT q->iTipMessageSent(ITIPHandler::ResultError, error + errorMessage);
}
}
......@@ -186,7 +186,7 @@ void ITIPHandler::Private::finishPublishInformation(Akonadi::MailScheduler::Resu
i18n("Publishing"),
QStringLiteral("IncidencePublishSuccess"));
}
emit q->informationPublished(ITIPHandler::ResultSuccess, QString());
Q_EMIT q->informationPublished(ITIPHandler::ResultSuccess, QString());
} else {
const QString error = i18n("Unable to publish the item '%1'",
m_queuedInvitation.incidence->summary());
......@@ -194,7 +194,7 @@ void ITIPHandler::Private::finishPublishInformation(Akonadi::MailScheduler::Resu
KMessageBox::error(m_parentWidget, error);
}
qCritical() << "Publish failed." << error << errorMessage;
emit q->informationPublished(ITIPHandler::ResultError, error + errorMessage);
Q_EMIT q->informationPublished(ITIPHandler::ResultError, error + errorMessage);
}
}
......@@ -207,7 +207,7 @@ void ITIPHandler::Private::finishSendAsICalendar(Akonadi::MailClient::Result res
i18n("Forwarding"),
QStringLiteral("IncidenceForwardSuccess"));
}
emit q->sentAsICalendar(ITIPHandler::ResultSuccess, QString());
Q_EMIT q->sentAsICalendar(ITIPHandler::ResultSuccess, QString());
} else {
if (m_parentWidget) {
KMessageBox::error(m_parentWidget,
......@@ -216,7 +216,7 @@ void ITIPHandler::Private::finishSendAsICalendar(Akonadi::MailClient::Result res
i18n("Forwarding Error"));
}
qCritical() << "Sent as iCalendar failed." << errorMessage;
emit q->sentAsICalendar(ITIPHandler::ResultError, errorMessage);
Q_EMIT q->sentAsICalendar(ITIPHandler::ResultError, errorMessage);
}
sender()->deleteLater(); // Delete the mailer
......
......@@ -89,7 +89,7 @@ void ITIPHandlerDialogDelegate::openDialogIncidenceCreated(Recipient recipient,
{
Q_UNUSED(recipient);
const int messageBoxReturnCode = askUserIfNeeded(question, action, buttonYes, buttonNo);
emit dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
Q_EMIT dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
}
void ITIPHandlerDialogDelegate::openDialogIncidenceModified(bool attendeeStatusChanged, Recipient recipient, const QString &question, Action action, const KGuiItem &buttonYes, const KGuiItem &buttonNo)
......@@ -97,20 +97,20 @@ void ITIPHandlerDialogDelegate::openDialogIncidenceModified(bool attendeeStatusC
Q_UNUSED(attendeeStatusChanged);
Q_UNUSED(recipient);
const int messageBoxReturnCode = askUserIfNeeded(question, action, buttonYes, buttonNo);
emit dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
Q_EMIT dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
}
void ITIPHandlerDialogDelegate::openDialogIncidenceDeleted(Recipient recipient, const QString &question, Action action, const KGuiItem &buttonYes, const KGuiItem &buttonNo)
{
Q_UNUSED(recipient);
const int messageBoxReturnCode = askUserIfNeeded(question, action, buttonYes, buttonNo);
emit dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
Q_EMIT dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
}
void ITIPHandlerDialogDelegate::openDialogSchedulerFinished(const QString &question, Action action, const KGuiItem &buttonYes, const KGuiItem &buttonNo)
{
const int messageBoxReturnCode = askUserIfNeeded(question, action, buttonYes, buttonNo);
emit dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
Q_EMIT dialogClosed(messageBoxReturnCode, mMethod, mIncidence);
}
ITIPHandlerHelper::SendResult
......@@ -137,11 +137,11 @@ ITIPHandlerHelper::sentInvitation(int messageBoxReturnCode, const KCalendarCore:
m_scheduler->performTransaction(_incidence, method);
return ITIPHandlerHelper::ResultSuccess;