Commit 3ca3df85 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent b05c7f8f
......@@ -610,7 +610,8 @@ void FreeBusyManagerPrivate::onHandlesFreeBusy(const QString &email, bool handle
qCDebug(AKONADICALENDAR_LOG) << respondingService << "responded to our FreeBusy request:" << handles;
int requestIndex = -1;
for (int i = 0; i < queue->mRequests.size(); ++i) {
const int requestsSize(queue->mRequests.size());
for (int i = 0; i < requestsSize; ++i) {
if (queue->mRequests.at(i).mInterface->service() == respondingService) {
requestIndex = i;
}
......
......@@ -218,7 +218,7 @@ bool ICalImporter::importIntoExistingResource(const QUrl &url, Akonadi::Collecti
if (!collection.isValid()) {
int dialogCode;
QStringList mimeTypes = QStringList() << KCalCore::Event::eventMimeType() << KCalCore::Todo::todoMimeType()
const QStringList mimeTypes = QStringList() << KCalCore::Event::eventMimeType() << KCalCore::Todo::todoMimeType()
<< KCalCore::Journal::journalMimeType();
collection = CalendarUtils::selectCollection(nullptr, dialogCode /*by-ref*/, mimeTypes);
}
......
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