Commit 5cc8d83d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent c11c3038
Pipeline #78226 passed with stage
in 6 minutes and 59 seconds
......@@ -538,17 +538,17 @@ private Q_SLOTS:
} else {
QCOMPARE(incidence->attendeeByMail(s_ourEmail).status(), Attendee::NeedsAction);
}
QCOMPARE(incidence->attendeeByMail(QLatin1String("mia@dev.nul")).status(), Attendee::NeedsAction);
QCOMPARE(incidence->attendeeByMail(QLatin1String("mia@dev.nul")).RSVP(), true);
QCOMPARE(incidence->attendeeByMail(QLatin1String("vincent@dev.nul")).status(), Attendee::Delegated);
QCOMPARE(incidence->attendeeByMail(QLatin1String("vincent@dev.nul")).RSVP(), false);
QCOMPARE(incidence->attendeeByMail(QLatin1String("jules@dev.nul")).status(), Attendee::Accepted);
QCOMPARE(incidence->attendeeByMail(QLatin1String("jules@dev.nul")).RSVP(), false);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("mia@dev.nul")).status(), Attendee::NeedsAction);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("mia@dev.nul")).RSVP(), true);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("vincent@dev.nul")).status(), Attendee::Delegated);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("vincent@dev.nul")).RSVP(), false);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("jules@dev.nul")).status(), Attendee::Accepted);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("jules@dev.nul")).RSVP(), false);
} else {
QCOMPARE(incidence->attendeeByMail(s_ourEmail).status(), Attendee::Accepted);
QCOMPARE(incidence->attendeeByMail(QLatin1String("mia@dev.nul")).status(), Attendee::Declined);
QCOMPARE(incidence->attendeeByMail(QLatin1String("vincent@dev.nul")).status(), Attendee::Delegated);
QCOMPARE(incidence->attendeeByMail(QLatin1String("jules@dev.nul")).status(), Attendee::Accepted);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("mia@dev.nul")).status(), Attendee::Declined);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("vincent@dev.nul")).status(), Attendee::Delegated);
QCOMPARE(incidence->attendeeByMail(QStringLiteral("jules@dev.nul")).status(), Attendee::Accepted);
}
delete fetchJob;
}
......
......@@ -155,7 +155,7 @@ static QString toString(const Attachment &)
return QString();
}
static QString toString(const QDate &date)
static QString toString(QDate date)
{
return date.toString();
}
......
......@@ -56,9 +56,9 @@ QUrl replaceVariablesUrl(const QUrl &url, const QString &email)
}
QString saveStr = url.path();
saveStr.replace(QRegularExpression(QStringLiteral("%email%"), QRegularExpression::CaseInsensitiveOption), email);
saveStr.replace(QRegularExpression(QStringLiteral("%name%"), QRegularExpression::CaseInsensitiveOption), emailName);
saveStr.replace(QRegularExpression(QStringLiteral("%server%"), QRegularExpression::CaseInsensitiveOption), emailHost);
saveStr.replace(QStringLiteral("%email%"), email, Qt::CaseInsensitive);
saveStr.replace(QStringLiteral("%name%"), emailName, Qt::CaseInsensitive);
saveStr.replace(QStringLiteral("%server%"), emailHost, Qt::CaseInsensitive);
QUrl retUrl(url);
retUrl.setPath(saveStr);
......@@ -547,8 +547,9 @@ void FreeBusyManagerPrivate::queryFreeBusyProviders(const QStringList &providers
for (const QString &provider : providers) {
FreeBusyProviderRequest request(provider);
connect(request.mInterface.data(), SIGNAL(handlesFreeBusy(QString, bool)), this, SLOT(onHandlesFreeBusy(QString, bool)));
// clang-format off
connect(request.mInterface.data(), SIGNAL(handlesFreeBusy(QString,bool)), this, SLOT(onHandlesFreeBusy(QString,bool)));
// clang-format on
request.mInterface->call(QStringLiteral("canHandleFreeBusy"), email);
request.mRequestStatus = FreeBusyProviderRequest::HandlingRequested;
mProvidersRequestsByEmail[email].mRequests << request;
......@@ -570,7 +571,7 @@ void FreeBusyManagerPrivate::onHandlesFreeBusy(const QString &email, bool handle
return;
}
auto iface = dynamic_cast<QDBusInterface *>(sender());
auto iface = qobject_cast<QDBusInterface *>(sender());
if (!iface) {
return;
}
......@@ -590,9 +591,9 @@ void FreeBusyManagerPrivate::onHandlesFreeBusy(const QString &email, bool handle
if (requestIndex == -1) {
return;
}
disconnect(iface, SIGNAL(handlesFreeBusy(QString, bool)), this, SLOT(onHandlesFreeBusy(QString, bool)));
// clang-format off
disconnect(iface, SIGNAL(handlesFreeBusy(QString,bool)), this, SLOT(onHandlesFreeBusy(QString,bool)));
// clang-format on
if (!handles) {
queue->mRequests.removeAt(requestIndex);
// If no more requests are left and no handler responded
......@@ -603,7 +604,9 @@ void FreeBusyManagerPrivate::onHandlesFreeBusy(const QString &email, bool handle
}
} else {
++queue->mHandlersCount;
connect(iface, SIGNAL(freeBusyRetrieved(QString, QString, bool, QString)), this, SLOT(onFreeBusyRetrieved(QString, QString, bool, QString)));
// clang-format off
connect(iface, SIGNAL(freeBusyRetrieved(QString,QString,bool,QString)), this, SLOT(onFreeBusyRetrieved(QString,QString,bool,QString)));
// clang-format on
iface->call(QStringLiteral("retrieveFreeBusy"), email, queue->mStartTime, queue->mEndTime);
queue->mRequests[requestIndex].mRequestStatus = FreeBusyProviderRequest::FreeBusyRequested;
}
......@@ -651,9 +654,9 @@ void FreeBusyManagerPrivate::onFreeBusyRetrieved(const QString &email, const QSt
if (requestIndex == -1) {
return;
}
disconnect(iface, SIGNAL(freeBusyRetrieved(QString, QString, bool, QString)), this, SLOT(onFreeBusyRetrieved(QString, QString, bool, QString)));
// clang-format off
disconnect(iface, SIGNAL(freeBusyRetrieved(QString,QString,bool,QString)), this, SLOT(onFreeBusyRetrieved(QString,QString,bool,QString)));
// clang-format on
queue->mRequests.removeAt(requestIndex);
if (success) {
......
......@@ -155,7 +155,7 @@ bool ICalImporter::importIntoNewResource(const QString &filename)
return true;
}
bool ICalImporter::importIntoExistingResource(const QUrl &url, Akonadi::Collection collection)
bool ICalImporter::importIntoExistingResource(const QUrl &url, Collection collection)
{
d->m_lastErrorMessage.clear();
......
......@@ -80,7 +80,7 @@ public Q_SLOTS:
*
* true if the import job was started. importIntoExistingFinished() signal will be emitted in this case.
*/
bool importIntoExistingResource(const QUrl &url, Collection collection);
bool importIntoExistingResource(const QUrl &url, Akonadi::Collection collection);
private:
class Private;
......
......@@ -154,7 +154,9 @@ void TodoPurger::purgeCompletedTodos()
d->deleteTodos();
} else {
d->m_calendar = FetchJobCalendar::Ptr(new FetchJobCalendar(this));
connect(d->m_calendar.data(), SIGNAL(loadFinished(bool, QString)), d, SLOT(onCalendarLoaded(bool, QString)));
// clang-format off
connect(d->m_calendar.data(), SIGNAL(loadFinished(bool,QString)), d, SLOT(onCalendarLoaded(bool,QString)));
// clang-format on
}
}
......
Supports Markdown
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