Commit 62657471 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 9b0e266e
...@@ -186,11 +186,9 @@ void Filter::setInfo(const QString &_info) ...@@ -186,11 +186,9 @@ void Filter::setInfo(const QString &_info)
Akonadi::Collection Filter::parseFolderString(const QString &folderParseString) Akonadi::Collection Filter::parseFolderString(const QString &folderParseString)
{ {
// Return an already created collection: // Return an already created collection:
QMap<QString, Akonadi::Collection>::const_iterator end(d->messageFolderCollectionMap.constEnd()); const Akonadi::Collection col = d->messageFolderCollectionMap.value(folderParseString);
for (QMap<QString, Akonadi::Collection>::const_iterator it = d->messageFolderCollectionMap.constBegin(); it != end; ++it) { if (col.isValid()) {
if (it.key() == folderParseString) { return col;
return it.value();
}
} }
// The folder hasn't yet been created, create it now. // The folder hasn't yet been created, create it now.
......
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