File indexing completed on 2024-10-27 04:51:07
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 0006 */ 0007 0008 #pragma once 0009 0010 #include <Akonadi/Collection> 0011 #include <QObject> 0012 class KJob; 0013 namespace KPIM 0014 { 0015 class ProgressItem; 0016 } 0017 class RemoveDuplicateMessageInFolderAndSubFolderJob : public QObject 0018 { 0019 Q_OBJECT 0020 public: 0021 explicit RemoveDuplicateMessageInFolderAndSubFolderJob(QObject *parent = nullptr, QWidget *parentWidget = nullptr); 0022 ~RemoveDuplicateMessageInFolderAndSubFolderJob() override; 0023 0024 void start(); 0025 0026 void setTopLevelCollection(const Akonadi::Collection &topLevelCollection); 0027 0028 private: 0029 void slotFetchCollectionFailed(); 0030 void slotFetchCollectionDone(const Akonadi::Collection::List &list); 0031 void slotFinished(KJob *job); 0032 void slotRemoveDuplicatesUpdate(KJob *job, const QString &description); 0033 void slotRemoveDuplicatesCanceled(KPIM::ProgressItem *item); 0034 Akonadi::Collection mTopLevelCollection; 0035 QWidget *const mParentWidget; 0036 };