Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > cf746698214707f972e669b661d0ae59 > files > 69

kdepim4-4.14.10-1.3.mga5.src.rpm

From 6f473caf64423c5c1b4f00fc56b31d2ab244a2c4 Mon Sep 17 00:00:00 2001
From: Montel Laurent <laurent.montel@kdab.com>
Date: Tue, 26 Jul 2016 14:57:43 +0000
Subject: [PATCH 69/74] Check for all collections which can be indexed

---
 kmail/searchdialog/searchwindow.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kmail/searchdialog/searchwindow.cpp b/kmail/searchdialog/searchwindow.cpp
index 263b3842e3..f7ee76f1a1 100644
--- a/kmail/searchdialog/searchwindow.cpp
+++ b/kmail/searchdialog/searchwindow.cpp
@@ -35,6 +35,7 @@
 #include "searchpatternwarning.h"
 #include "pimcommon/folderdialog/selectmulticollectiondialog.h"
 #include "pimcommon/util/indexerutils.h"
+#include "pimcommon/util/pimutil.h"
 #include "incompleteindexdialog.h"
 
 #include <Akonadi/CollectionModifyJob>
@@ -916,7 +917,9 @@ QVector<qint64> SearchWindow::checkIncompleteIndex(const Akonadi::Collection::Li
             const QModelIndex idx = Akonadi::EntityTreeModel::modelIndexForCollection(etm, col);
             const Akonadi::Collection modelCol = etm->data(idx, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
             // Only index offline IMAP collections
-            if (modelCol.cachePolicy().localParts().contains(QLatin1String("RFC822"))) {
+            if (PimCommon::Util::isImapResource(modelCol.resource()) && !modelCol.cachePolicy().localParts().contains(QLatin1String("RFC822"))) {
+                continue;
+            } else {
               cols.push_back(modelCol);
             }
         }
-- 
2.14.1