From 567d7db5cdeda77af8f15e81383a5d54e8340b4d Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Wed, 24 Aug 2016 13:13:50 +0200 Subject: [PATCH] Minor optimization --- .../dialog/filteractionmissingargumentdialog.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/filter/dialog/filteractionmissingargumentdialog.cpp b/src/filter/dialog/filteractionmissingargumentdialog.cpp index 722f4b0..101d542 100644 --- a/src/filter/dialog/filteractionmissingargumentdialog.cpp +++ b/src/filter/dialog/filteractionmissingargumentdialog.cpp @@ -178,15 +178,15 @@ Akonadi::Collection::List FilterActionMissingCollectionDialog::potentialCorrectF return lst; } - const int lastSlash = realPath.lastIndexOf(QLatin1Char('/')); - QString lastElement; - if (lastSlash == -1) { - lastElement = realPath; - } else { - lastElement = realPath.right(realPath.length() - lastSlash - 1); - } - if (KernelIf->collectionModel()) { + const int lastSlash = realPath.lastIndexOf(QLatin1Char('/')); + QString lastElement; + if (lastSlash == -1) { + lastElement = realPath; + } else { + lastElement = realPath.right(realPath.length() - lastSlash - 1); + } + FilterActionMissingCollectionDialog::getPotentialFolders( KernelIf->collectionModel(), QModelIndex(), lastElement, lst);