Commit c4f5d4fd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

run git clang-format

parent f88534d6
......@@ -31,8 +31,8 @@ void CategoryTypeComboBoxTest::shouldSetType_data()
{
QTest::addColumn<LoggingCategory::LoggingType>("input");
QTest::newRow("all") << LoggingCategory::All;
QTest::newRow("info") << LoggingCategory::Info;
QTest::newRow("all") << LoggingCategory::All;
QTest::newRow("info") << LoggingCategory::Info;
QTest::newRow("warning") << LoggingCategory::Warning;
QTest::newRow("critical") << LoggingCategory::Critical;
QTest::newRow("off") << LoggingCategory::Off;
......
......@@ -7,11 +7,11 @@
#include "configurecustomsettingwidgettest.h"
#include "configurecustomsettingwidget.h"
#include <KLineEdit>
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <KLineEdit>
#include <QSignalSpy>
#include <QCheckBox>
#include <QTest>
ConfigureCustomSettingWidgetTest::ConfigureCustomSettingWidgetTest(QObject *parent)
......@@ -48,11 +48,11 @@ void ConfigureCustomSettingWidgetTest::shouldRestoreRules_data()
{
QTest::addColumn<QString>("input");
QTest::newRow("empty") << QString();
QTest::newRow("validrule") << QStringLiteral("foo.warning=true");
QTest::newRow("validrule2") << QStringLiteral("foo=true");
QTest::newRow("validrule3") << QStringLiteral("foo=false");
QTest::newRow("validrule3*") << QStringLiteral("*.warning=false");
QTest::newRow("empty") << QString();
QTest::newRow("validrule") << QStringLiteral("foo.warning=true");
QTest::newRow("validrule2") << QStringLiteral("foo=true");
QTest::newRow("validrule3") << QStringLiteral("foo=false");
QTest::newRow("validrule3*") << QStringLiteral("*.warning=false");
}
void ConfigureCustomSettingWidgetTest::shouldRestoreRules()
......
......@@ -6,8 +6,8 @@
*/
#include "environmentsettingsrulespagetest.h"
#include "environmentsettingsrulespage.h"
#include "environmentplaintextedit.h"
#include "environmentsettingsrulespage.h"
#include <QLabel>
#include <QTest>
EnvironmentSettingsRulesPageTest::EnvironmentSettingsRulesPageTest(QObject *parent)
......
......@@ -9,9 +9,9 @@
#include "groupmanagementdialog.h"
#include "groupmanagementwidget.h"
#include <QDialogButtonBox>
#include <QStandardPaths>
#include <QTest>
#include <QVBoxLayout>
#include <QStandardPaths>
QTEST_MAIN(GroupManagementDialogTest)
GroupManagementDialogTest::GroupManagementDialogTest(QObject *parent)
: QObject(parent)
......
......@@ -8,10 +8,10 @@
#include "kdeapplicationdebugsettingpagetest.h"
#include "kdeapplicationdebugsettingpage.h"
#include "kdeapplicationtreelistwidget.h"
#include <QPushButton>
#include <KTreeWidgetSearchLine>
#include <QHeaderView>
#include <QPushButton>
#include <QTest>
#include <KTreeWidgetSearchLine>
KDEApplicationDebugSettingPageTest::KDEApplicationDebugSettingPageTest(QObject *parent)
: QObject(parent)
......
......@@ -7,10 +7,11 @@
#include "kdeapplicationtreelistwidgettest.h"
#include "kdeapplicationtreelistwidget.h"
#include <QTest>
#include <QHeaderView>
#include <QTest>
KDEApplicationTreeListWidgetTest::KDEApplicationTreeListWidgetTest(QObject *parent) : QObject(parent)
KDEApplicationTreeListWidgetTest::KDEApplicationTreeListWidgetTest(QObject *parent)
: QObject(parent)
{
}
......
......@@ -6,14 +6,14 @@
*/
#include "kdebugsettingsdialogtest.h"
#include "kdebugsettingsdialog.h"
#include "categorywarning.h"
#include "kdebugsettingsdialog.h"
#include "loadtoolbutton.h"
#include "savetoolbutton.h"
#include <QDialogButtonBox>
#include <QPushButton>
#include <QTabWidget>
#include <QStandardPaths>
#include <QTabWidget>
#include <QTest>
#include <QToolButton>
......@@ -32,14 +32,14 @@ void KDebugSettingsDialogTest::shouldHaveDefaultValue()
KDebugSettingsDialog dlg;
auto buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox"));
QVERIFY(buttonBox);
QCOMPARE(buttonBox->standardButtons(), QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Apply);
QCOMPARE(buttonBox->standardButtons(),
QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Apply);
auto tab = dlg.findChild<QTabWidget *>(QStringLiteral("tabwidget"));
QVERIFY(tab);
for (int i = 0; i < tab->count(); ++i) {
const QString objName = tab->widget(i)->objectName();
const bool hasCorrectName = (objName == QLatin1String("kdeapplicationsettingspage"))
|| (objName == QLatin1String("customsettingspage"))
|| (objName == QLatin1String("environmentsettingsrulespage"));
const bool hasCorrectName = (objName == QLatin1String("kdeapplicationsettingspage")) || (objName == QLatin1String("customsettingspage"))
|| (objName == QLatin1String("environmentsettingsrulespage"));
QVERIFY(hasCorrectName);
}
auto saveAs = buttonBox->findChild<SaveToolButton *>(QStringLiteral("saveas_button"));
......
This diff is collapsed.
......@@ -6,12 +6,12 @@
*/
#include "loadcategoriesjobtest.h"
#include "loadcategoriesjob.h"
#include "kdebugsettingsutil.h"
#include "loadcategoriesjob.h"
#include <QTest>
#include <QFile>
#include <QDebug>
#include <QFile>
#include <QTest>
LoadCategoriesJobTest::LoadCategoriesJobTest(QObject *parent)
: QObject(parent)
......@@ -39,88 +39,88 @@ void LoadCategoriesJobTest::shouldReadRules_data()
QTest::addColumn<LoggingCategory::List>("qtkdecategories");
QTest::newRow("empty") << QStringLiteral("emptyrulefiles.ini") << QString() << false << LoggingCategory::List() << LoggingCategory::List();
QTest::newRow("commentedlines") << QStringLiteral("commentedrulefiles.ini") << QString() << false << LoggingCategory::List() << LoggingCategory::List();
QTest::newRow("rulesbeforesection") << QStringLiteral("rulebeforerulessectionfiles.ini") << QString() << false << LoggingCategory::List() << LoggingCategory::List();
QTest::newRow("rulesbeforesection") << QStringLiteral("rulebeforerulessectionfiles.ini") << QString() << false << LoggingCategory::List()
<< LoggingCategory::List();
const LoggingCategory ikwsInfo(QStringLiteral("KUriFilter IKWS (KIO)"), QStringLiteral("org.kde.kurifilter-ikws"), LoggingCategory::Info, QString(), true);
const LoggingCategory shorturiInfo(QStringLiteral("KUriFilter Shorturi (KIO)"), QStringLiteral("org.kde.kurifilter-shorturi"), LoggingCategory::Info, QString(), true);
const LoggingCategory shorturiInfo(QStringLiteral("KUriFilter Shorturi (KIO)"),
QStringLiteral("org.kde.kurifilter-shorturi"),
LoggingCategory::Info,
QString(),
true);
const LoggingCategory bluezQtInfo(QStringLiteral("BluezQt"), QStringLiteral("BluezQt"), LoggingCategory::Info, QString(), true);
const LoggingCategory kauthInfo(QStringLiteral("KAuth"), QStringLiteral("kf5.kauth"), LoggingCategory::Info, QString(), true);
LoggingCategory::List qtKdeCategories;
qtKdeCategories.append(LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Info, QString(), true));
qtKdeCategories.append(
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Info, QString(), true));
qtKdeCategories.append(ikwsInfo);
qtKdeCategories.append(shorturiInfo);
qtKdeCategories.append(bluezQtInfo);
qtKdeCategories.append(kauthInfo);
QTest::newRow("emptywithlistkdeloggingcategories") << QStringLiteral("rulebeforerulessectionfiles.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
QTest::newRow("emptywithlistkdeloggingcategories")
<< QStringLiteral("rulebeforerulessectionfiles.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List() << qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Off, QString(), false);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Off, QString(), false);
QTest::newRow("oneelementoff") << QStringLiteral("oneelementoff.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementoff") << QStringLiteral("oneelementoff.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
QTest::newRow("oneelementonelineoff") << QStringLiteral("oneelementonelineoff.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List() << qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, QString(), true);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, QString(), true);
QTest::newRow("oneelementall") << QStringLiteral("oneelementall.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementall") << QStringLiteral("oneelementall.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
QTest::newRow("oneelementonelineall") << QStringLiteral("oneelementonelineall.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List() << qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Info, QString(), true);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Info, QString(), true);
QTest::newRow("oneelementinfo") << QStringLiteral("oneelementinfo.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementinfo") << QStringLiteral("oneelementinfo.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
QTest::newRow("oneelementinfo") << QStringLiteral("oneelementinfobis.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementinfo") << QStringLiteral("oneelementinfobis.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Warning, QString(), true);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Warning, QString(), true);
QTest::newRow("oneelementwarning") << QStringLiteral("oneelementwarning.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementwarning") << QStringLiteral("oneelementwarning.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Critical, QString(), true);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Critical, QString(), true);
QTest::newRow("oneelementcritical") << QStringLiteral("oneelementcritical.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementcritical") << QStringLiteral("oneelementcritical.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
QTest::newRow("oneelementonelinecritical") << QStringLiteral("oneelementonelinecritical.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List() << qtKdeCategories;
QTest::newRow("oneelementtwolinecritical") << QStringLiteral("oneelementtwolinecritical.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
<< qtKdeCategories;
<< LoggingCategory::List() << qtKdeCategories;
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Warning, QString(), true);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Warning, QString(), true);
QTest::newRow("oneelementdebug") << QStringLiteral("oneelementdebug.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
QTest::newRow("oneelementdebug") << QStringLiteral("oneelementdebug.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
// Duplicate entries
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, QString(), true);
QTest::newRow("duplicates") << QStringLiteral("duplicates.ini") << QStringLiteral("correct.categories") << false
<< LoggingCategory::List()
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, QString(), true);
QTest::newRow("duplicates") << QStringLiteral("duplicates.ini") << QStringLiteral("correct.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
// Duplicate entries with duplicate categories
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, QString(), true);
QTest::newRow("duplicates") << QStringLiteral("duplicates.ini") << QStringLiteral("duplicates.categories") << false
<< LoggingCategory::List()
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::All, QString(), true);
QTest::newRow("duplicates") << QStringLiteral("duplicates.ini") << QStringLiteral("duplicates.categories") << false << LoggingCategory::List()
<< qtKdeCategories;
// Test with extract elements
......@@ -130,11 +130,11 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customTmp.loggingType = LoggingCategory::Critical;
customTmp.enabled = true;
customCategories.append(customTmp);
qtKdeCategories[0] = LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Warning, QString(), true);
qtKdeCategories[0] =
LoggingCategory(QStringLiteral("KPasswdServer (KIO)"), QStringLiteral("org.kde.kio.kpasswdserver"), LoggingCategory::Warning, QString(), true);
QTest::newRow("oneelementdebugandanextract") << QStringLiteral("oneelementdebugandanextract.ini") << QStringLiteral("correct.categories") << false
<< customCategories
<< qtKdeCategories;
<< customCategories << qtKdeCategories;
// Test with extract elements
customCategories.clear();
......@@ -144,10 +144,9 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customCategories.append(customTmp);
QTest::newRow("oneelementdebugandanextractfalse") << QStringLiteral("oneelementdebugandanextractfalse.ini") << QStringLiteral("correct.categories") << false
<< customCategories
<< qtKdeCategories;
<< customCategories << qtKdeCategories;
//Test without categories
// Test without categories
qtKdeCategories.clear();
customCategories.clear();
customTmp.categoryName = QStringLiteral("toto");
......@@ -168,9 +167,7 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customTmp.enabled = false;
customCategories.append(customTmp);
QTest::newRow("testwithoutcategories") << QStringLiteral("testwithoutcategories.ini") << QString() << false
<< customCategories
<< qtKdeCategories;
QTest::newRow("testwithoutcategories") << QStringLiteral("testwithoutcategories.ini") << QString() << false << customCategories << qtKdeCategories;
qtKdeCategories.clear();
customCategories.clear();
......@@ -178,8 +175,7 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customTmp.loggingType = LoggingCategory::Warning;
customTmp.enabled = false;
customCategories.append(customTmp);
QTest::newRow("testwithoutcategorieswarning") << QStringLiteral("testwithoutcategorieswarning.ini") << QString() << false
<< customCategories
QTest::newRow("testwithoutcategorieswarning") << QStringLiteral("testwithoutcategorieswarning.ini") << QString() << false << customCategories
<< qtKdeCategories;
}
......@@ -207,12 +203,14 @@ void LoadCategoriesJobTest::shouldReadRules()
if (job.customCategories() != customcategories) {
const auto catList = job.customCategories();
for (const LoggingCategory &cat : catList) {
qDebug() << "customcategories cat." << cat.description << " logname" << cat.categoryName << " enabled " << cat.enabled << "type " << cat.loggingType;
qDebug() << "customcategories cat." << cat.description << " logname" << cat.categoryName << " enabled " << cat.enabled << "type "
<< cat.loggingType;
}
qDebug() << "AFTER";
for (const LoggingCategory &cat : qAsConst(customcategories)) {
qDebug() << "customcategories cat." << cat.description << " logname" << cat.categoryName << " enabled " << cat.enabled << "type " << cat.loggingType;
qDebug() << "customcategories cat." << cat.description << " logname" << cat.categoryName << " enabled " << cat.enabled << "type "
<< cat.loggingType;
}
}
QCOMPARE(job.customCategories().count(), customcategories.count());
......
......@@ -7,8 +7,8 @@
#include "loadgroupmenutest.h"
#include "loadgroupmenu.h"
#include <QTest>
#include <QStandardPaths>
#include <QTest>
QTEST_MAIN(LoadGroupMenuTest)
LoadGroupMenuTest::LoadGroupMenuTest(QObject *parent)
: QObject(parent)
......
......@@ -49,11 +49,16 @@ void LoggingCategoryTest::shouldCreateRules_data()
QTest::addColumn<QString>("result");
QTest::newRow("all") << QStringLiteral("foo") << LoggingCategory::All << QStringLiteral("foo=true\n");
QTest::newRow("debug") << QStringLiteral("foo") << LoggingCategory::Debug << QStringLiteral("foo.info=false\nfoo.debug=true\nfoo.warning=true\nfoo.critical=true\n");
QTest::newRow("info") << QStringLiteral("foo") << LoggingCategory::Info << QStringLiteral("foo.info=true\nfoo.warning=true\nfoo.critical=true\nfoo.debug=false\n");
QTest::newRow("critical") << QStringLiteral("foo") << LoggingCategory::Critical << QStringLiteral("foo.info=false\nfoo.debug=false\nfoo.warning=false\nfoo.critical=true\n");
QTest::newRow("warning") << QStringLiteral("foo") << LoggingCategory::Warning << QStringLiteral("foo.info=false\nfoo.debug=false\nfoo.warning=true\nfoo.critical=true\n");
QTest::newRow("off") << QStringLiteral("foo") << LoggingCategory::Off << QStringLiteral("foo.info=false\nfoo.debug=false\nfoo.warning=false\nfoo.critical=false\n");
QTest::newRow("debug") << QStringLiteral("foo") << LoggingCategory::Debug
<< QStringLiteral("foo.info=false\nfoo.debug=true\nfoo.warning=true\nfoo.critical=true\n");
QTest::newRow("info") << QStringLiteral("foo") << LoggingCategory::Info
<< QStringLiteral("foo.info=true\nfoo.warning=true\nfoo.critical=true\nfoo.debug=false\n");
QTest::newRow("critical") << QStringLiteral("foo") << LoggingCategory::Critical
<< QStringLiteral("foo.info=false\nfoo.debug=false\nfoo.warning=false\nfoo.critical=true\n");
QTest::newRow("warning") << QStringLiteral("foo") << LoggingCategory::Warning
<< QStringLiteral("foo.info=false\nfoo.debug=false\nfoo.warning=true\nfoo.critical=true\n");
QTest::newRow("off") << QStringLiteral("foo") << LoggingCategory::Off
<< QStringLiteral("foo.info=false\nfoo.debug=false\nfoo.warning=false\nfoo.critical=false\n");
}
void LoggingCategoryTest::shouldCreateRules()
......
......@@ -24,7 +24,7 @@ void RenameCategoryTest::shouldParseRenameLine_data()
QTest::addColumn<QString>("newname");
QTest::addColumn<QString>("original");
QTest::addColumn<bool>("valid");
QTest::newRow("empty") << QString() << QString() << QString() << false;
QTest::newRow("empty") << QString() << QString() << QString() << false;
QTest::newRow("validLine") << QStringLiteral("log linux") << QStringLiteral("linux") << QStringLiteral("log") << true;
QTest::newRow("validLinewithspace") << QStringLiteral(" log linux ") << QStringLiteral("linux") << QStringLiteral("log") << true;
QTest::newRow("comment") << QStringLiteral("#log linux ") << QString() << QString() << false;
......
......@@ -20,10 +20,7 @@ void compareFile(const QString &name)
const QString generatedFile = QLatin1String(KDEBUGSETTINGS_BINARY_DATA_DIR) + QLatin1Char('/') + name + QStringLiteral("-generated.ref");
// compare to reference file
QStringList args = QStringList()
<< QStringLiteral("-u")
<< refFile
<< generatedFile;
QStringList args = QStringList() << QStringLiteral("-u") << refFile << generatedFile;
QProcess proc;
proc.setProcessChannelMode(QProcess::ForwardedChannels);
proc.start(QStringLiteral("diff"), args);
......
......@@ -36,7 +36,7 @@ void CategoryTypeComboBox::setType(LoggingCategory::LoggingType type)
if (pos != -1) {
setCurrentIndex(pos);
} else {
//Default;
// Default;
setCurrentIndex(0);
}
}
......
......@@ -8,9 +8,9 @@
#ifndef CATEGORYTYPECOMBOBOX_H
#define CATEGORYTYPECOMBOBOX_H
#include <QComboBox>
#include "loggingcategory.h"
#include "libkdebugsettings_export.h"
#include "loggingcategory.h"
#include <QComboBox>
class LIBKDEBUGSETTINGS_EXPORT CategoryTypeComboBox : public QComboBox
{
......@@ -26,6 +26,7 @@ public:
Q_REQUIRED_RESULT LoggingCategory::LoggingType defaultCategories() const;
void restoreToDefault();
private:
LoggingCategory::LoggingType mDefaultCategories = LoggingCategory::Info;
};
......
......@@ -8,8 +8,8 @@
#ifndef CATEGORYWARNING_H
#define CATEGORYWARNING_H
#include <KMessageWidget>
#include "libkdebugsettings_private_export.h"
#include <KMessageWidget>
class LIBKDEBUGSETTINGS_EXPORT_TEST_EXPORT CategoryWarning : public KMessageWidget
{
Q_OBJECT
......
......@@ -6,10 +6,10 @@
*/
#include "changedebugmodejob.h"
#include "kdebugsettingsloadingcategories.h"
#include "kdebugsettings_debug.h"
#include "saverulesjob.h"
#include "kdebugsettingsloadingcategories.h"
#include "kdebugsettingsutil.h"
#include "saverulesjob.h"
ChangeDebugModeJob::ChangeDebugModeJob()
{
......@@ -129,7 +129,8 @@ void ChangeDebugModeJob::setLoggingCategoriesName(const QStringList &loggingCate
bool ChangeDebugModeJob::debugModeIsValid(const QString &value) const
{
if (value == QLatin1String("Full") || value == QLatin1String("Info") || value == QLatin1String("Warning") || value == QLatin1String("Critical") || value == QLatin1String("Off")) {
if (value == QLatin1String("Full") || value == QLatin1String("Info") || value == QLatin1String("Warning") || value == QLatin1String("Critical")
|| value == QLatin1String("Off")) {
return true;
}
return false;
......
......@@ -8,9 +8,9 @@
#ifndef CONFIGURECUSTOMSETTINGDIALOG_H
#define CONFIGURECUSTOMSETTINGDIALOG_H
#include <QDialog>
#include "kdebugsettingsdialog.h"
#include "libkdebugsettings_export.h"
#include <QDialog>
class ConfigureCustomSettingWidget;
class LIBKDEBUGSETTINGS_EXPORT ConfigureCustomSettingDialog : public QDialog
......@@ -21,6 +21,7 @@ public:
~ConfigureCustomSettingDialog() override;
void setRule(const QString &rule);
Q_REQUIRED_RESULT QString rule() const;
private:
ConfigureCustomSettingWidget *mCustomSettingWidget = nullptr;
};
......
......@@ -9,12 +9,12 @@
#include "categorytypecombobox.h"
#include "kdebugsettingsdialog.h"
#include "kdebugsettingsutil.h"
#include <KLineEdit>
#include <KLocalizedString>
#include <QCheckBox>
#include <QHBoxLayout>
#include <QLabel>
#include <KLineEdit>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QCheckBox>
ConfigureCustomSettingWidget::ConfigureCustomSettingWidget(QWidget *parent)
: QWidget(parent)
......
......@@ -8,8 +8,8 @@
#ifndef CONFIGURECUSTOMSETTINGWIDGET_H
#define CONFIGURECUSTOMSETTINGWIDGET_H
#include <QWidget>
#include "libkdebugsettings_private_export.h"
#include <QWidget>
class KLineEdit;
class QCheckBox;
class CategoryTypeComboBox;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment