File indexing completed on 2022-09-27 16:31:46

0001 /*
0002     SPDX-FileCopyrightText: 2019-2022 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 "libkdebugsettings_export.h"
0012 #include "loggingcategory.h"
0013 #include "renamecategory.h"
0014 #include <QString>
0015 
0016 class LIBKDEBUGSETTINGS_EXPORT KDebugSettingsLoadingCategories
0017 {
0018 public:
0019     KDebugSettingsLoadingCategories();
0020     ~KDebugSettingsLoadingCategories();
0021 
0022     void readQtLoggingFile();
0023 
0024     Q_REQUIRED_RESULT QString environmentrules() const;
0025     Q_REQUIRED_RESULT RenameCategory::List renameCategoriesList() const;
0026     Q_REQUIRED_RESULT KdeLoggingCategory::List categoriesList() const;
0027     Q_REQUIRED_RESULT LoggingCategory::List customCategories() const;
0028     Q_REQUIRED_RESULT LoggingCategory::List qtKdeCategories() const;
0029     Q_REQUIRED_RESULT bool foundOverrideRule() const;
0030 
0031     void readCategoriesFiles(const QString &path);
0032 
0033 private:
0034     KdeLoggingCategory::List mCategoriesList;
0035     RenameCategory::List mRenameCategoriesList;
0036     QString mEnvironmentrules;
0037 
0038     LoggingCategory::List mCustomCategories;
0039     LoggingCategory::List mQtKdeCategories;
0040     bool mFoundOverrideRule = false;
0041 };