|
|
|
|
@ -103,7 +103,7 @@ bool MailCommon::Util::isLocalCollection(const QString &resource) |
|
|
|
|
|| resource.contains(QStringLiteral("akonadi_mixedmaildir_resource")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QString MailCommon::Util::fullCollectionPath(const Akonadi::Collection &collection) |
|
|
|
|
QString MailCommon::Util::fullCollectionPath(const Akonadi::Collection &collection, bool addAccountName) |
|
|
|
|
{ |
|
|
|
|
QString fullPath; |
|
|
|
|
|
|
|
|
|
@ -116,8 +116,18 @@ QString MailCommon::Util::fullCollectionPath(const Akonadi::Collection &collecti |
|
|
|
|
fullPath = idx.data().toString(); |
|
|
|
|
idx = idx.parent(); |
|
|
|
|
while (idx != QModelIndex()) { |
|
|
|
|
fullPath = idx.data().toString() + QLatin1Char('/') + fullPath; |
|
|
|
|
const QString tmp = idx.data().toString() + QLatin1Char('/') + fullPath; |
|
|
|
|
idx = idx.parent(); |
|
|
|
|
if (idx != QModelIndex()) { |
|
|
|
|
fullPath = tmp; |
|
|
|
|
} else { |
|
|
|
|
if (!addAccountName) { |
|
|
|
|
break; |
|
|
|
|
} else { |
|
|
|
|
fullPath = tmp; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return fullPath; |
|
|
|
|
} |
|
|
|
|
|