File indexing completed on 2024-12-15 04:54:36

0001 /*
0002  * SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  *
0006  */
0007 
0008 #pragma once
0009 
0010 #include "messagelist_private_export.h"
0011 #include <Akonadi/Collection>
0012 #include <KMessageWidget>
0013 class KJob;
0014 
0015 namespace Akonadi
0016 {
0017 namespace Search
0018 {
0019 namespace PIM
0020 {
0021 class IndexedItems;
0022 }
0023 }
0024 }
0025 namespace Akonadi
0026 {
0027 class CollectionFetchJob;
0028 }
0029 namespace MessageList
0030 {
0031 namespace Core
0032 {
0033 class MESSAGELIST_TESTS_EXPORT SearchCollectionIndexingWarning : public KMessageWidget
0034 {
0035     Q_OBJECT
0036 public:
0037     explicit SearchCollectionIndexingWarning(QWidget *parent = nullptr);
0038     ~SearchCollectionIndexingWarning() override;
0039 
0040     void setCollection(const Akonadi::Collection &collection);
0041 
0042 private:
0043     void queryRootCollectionFetchFinished(KJob *job);
0044     void queryCollectionFetchFinished(KJob *job);
0045     Akonadi::CollectionFetchJob *fetchCollections(const Akonadi::Collection::List &cols, bool recursive);
0046     void queryIndexerStatus();
0047 
0048     Akonadi::Collection mCollection;
0049     Akonadi::Collection::List mCollections;
0050     Akonadi::Search::PIM::IndexedItems *const mIndexedItems;
0051 };
0052 }
0053 }