File indexing completed on 2024-12-22 05:28:43

0001 /*
0002     SPDX-FileCopyrightText: 2016-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 "kdeloggingcategory.h"
0011 #include "libkdebugsettingscore_export.h"
0012 #include "loggingcategory.h"
0013 #include "renamecategory.h"
0014 
0015 class LIBKDEBUGSETTINGSCORE_EXPORT LoadCategoriesJob
0016 {
0017 public:
0018     LoadCategoriesJob();
0019     void start();
0020     void setCategories(const KdeLoggingCategory::List &categories);
0021     void setRenamedCategories(const RenameCategory::List &renameCategories);
0022 
0023     [[nodiscard]] LoggingCategory::List customCategories() const;
0024 
0025     [[nodiscard]] LoggingCategory::List qtKdeCategories() const;
0026 
0027     void setFileName(const QString &filename);
0028     [[nodiscard]] bool foundOverrideRule() const;
0029 
0030 private:
0031     KdeLoggingCategory::List mCategories;
0032     LoggingCategory::List mCustomCategories;
0033     LoggingCategory::List mQtKdeCategories;
0034     RenameCategory::List mRenameCategories;
0035     QString mFileName;
0036     bool mFoundOverrideRule = false;
0037 };