[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdebugsettings] /: Astyle kdelibs
From: Montel Laurent <montel () kde ! org>
Date: 2016-06-25 13:17:33
Message-ID: E1bGnSn-000285-Hk () code ! kde ! org
[Download RAW message or body]
Git commit 04a00586100d93adfed5b393501233aa9e5994b6 by Montel Laurent.
Committed on 25/06/2016 at 13:17.
Pushed by mlaurent into branch 'master'.
Astyle kdelibs
M +2 -6 autotests/loadcategoriesjobtest.cpp
M +2 -2 src/kdebugsettingsutil.cpp
M +2 -1 src/kdebugsettingsutil.h
M +9 -13 src/loadcategoriesjob.cpp
http://commits.kde.org/kdebugsettings/04a00586100d93adfed5b393501233aa9e5994b6
diff --git a/autotests/loadcategoriesjobtest.cpp \
b/autotests/loadcategoriesjobtest.cpp index af1de02..0b34f1f 100644
--- a/autotests/loadcategoriesjobtest.cpp
+++ b/autotests/loadcategoriesjobtest.cpp
@@ -362,16 +362,14 @@ void LoadCategoriesJobTest::shouldReadRules_data()
customTmp.enabled = false;
customCategories.append(customTmp);
-
customTmp.logName = QStringLiteral("toto");
customTmp.loggingType = LoggingCategory::Critical;
customTmp.enabled = false;
customCategories.append(customTmp);
QTest::newRow("testwithoutcategories") << \
QStringLiteral("testwithoutcategories.ini") << QString() << false
- << customCategories
- << qtKdeCategories;
-
+ << customCategories
+ << qtKdeCategories;
qtKdeCategories.clear();
customCategories.clear();
@@ -406,7 +404,6 @@ void LoadCategoriesJobTest::shouldReadRules()
job.setCategories(listKdeLoggingCategories);
job.start();
-
#ifdef DEBUG_RESULT
Q_FOREACH (const LoggingCategory &cat, job.customCategories()) {
qDebug() << "customcategories cat." << cat.description << " logname" << \
cat.logName << " enabled " << cat.enabled << "type " << cat.loggingType; @@ -423,7 \
+420,6 @@ void LoadCategoriesJobTest::shouldReadRules()
QCOMPARE(job.foundOverrideRule(), foundoverriderules);
-
#ifdef DEBUG_RESULT
Q_FOREACH (const LoggingCategory &cat, job.qtKdeCategories()) {
qDebug() << "qtKdeCategories cat." << cat.description << " logname" << \
cat.logName << " enabled " << cat.enabled << "type " << \
cat.loggingType;
diff --git a/src/kdebugsettingsutil.cpp b/src/kdebugsettingsutil.cpp
index fd56839..1b0448b 100644
--- a/src/kdebugsettingsutil.cpp
+++ b/src/kdebugsettingsutil.cpp
@@ -192,7 +192,7 @@ QList<KDebugSettingsUtil::LoadLoggingCategory> \
KDebugSettingsUtil::readLoggingQt
KDebugSettingsUtil::LoadLoggingCategory nextCat = \
hashLoadLoggingCategories.value(cat.logName); if (nextCat.isValid()) {
LoadLoggingCategory::LogType type;
- switch(cat.type) {
+ switch (cat.type) {
case LineLoggingQtCategory::Unknown:
type = LoadLoggingCategory::Unknown;
break;
@@ -221,7 +221,7 @@ QList<KDebugSettingsUtil::LoadLoggingCategory> \
KDebugSettingsUtil::readLoggingQt hashLoadLoggingCategories[cat.logName] = nextCat;
} else {
nextCat.logName = cat.logName;
- switch(cat.type) {
+ switch (cat.type) {
case LineLoggingQtCategory::Unknown:
\
nextCat.loggingTypes.insert(LoadLoggingCategory::Unknown, cat.enabled ? \
LoadLoggingCategory::Enabled : LoadLoggingCategory::Disabled); break;
diff --git a/src/kdebugsettingsutil.h b/src/kdebugsettingsutil.h
index 913262a..f287188 100644
--- a/src/kdebugsettingsutil.h
+++ b/src/kdebugsettingsutil.h
@@ -45,7 +45,8 @@ struct LineLoggingQtCategory {
All
};
- bool isValid() const {
+ bool isValid() const
+ {
return !logName.isEmpty();
}
bool operator ==(const LineLoggingQtCategory &other) const
diff --git a/src/loadcategoriesjob.cpp b/src/loadcategoriesjob.cpp
index 6e8712b..87a7d92 100644
--- a/src/loadcategoriesjob.cpp
+++ b/src/loadcategoriesjob.cpp
@@ -45,8 +45,6 @@ LoggingCategory::LoggingType updateLoggingType(const \
LoggingCategory &cat) return cat.loggingType;
}
-
-
LoggingCategory::LoggingType canDisplayType(const \
QMap<KDebugSettingsUtil::LoadLoggingCategory::LogType, \
KDebugSettingsUtil::LoadLoggingCategory::Status> &types) {
KDebugSettingsUtil::LoadLoggingCategory::Status warning = \
types.value(KDebugSettingsUtil::LoadLoggingCategory::Warning); @@ -57,7 +55,7 @@ \
LoggingCategory::LoggingType canDisplayType(const QMap<KDebugSettingsUtil::LoadL
if (all == KDebugSettingsUtil::LoadLoggingCategory::Enabled) {
return LoggingCategory::All;
- } else if ( all == KDebugSettingsUtil::LoadLoggingCategory::Disabled) {
+ } else if (all == KDebugSettingsUtil::LoadLoggingCategory::Disabled) {
return LoggingCategory::Off;
} else if (warning == KDebugSettingsUtil::LoadLoggingCategory::Enabled &&
debug == KDebugSettingsUtil::LoadLoggingCategory::Enabled &&
@@ -155,38 +153,36 @@ void LoadCategoriesJob::start()
if (i.value() != \
KDebugSettingsUtil::LoadLoggingCategory::UnknownStatus) { LoggingCategory tmp;
tmp.logName = cat.logName;
- switch(i.key()) {
+ switch (i.key()) {
case KDebugSettingsUtil::LoadLoggingCategory::Unknown:
- tmp.loggingType =LoggingCategory::Undefined;
+ tmp.loggingType = LoggingCategory::Undefined;
break;
case KDebugSettingsUtil::LoadLoggingCategory::Off:
- tmp.loggingType =LoggingCategory::Off;
+ tmp.loggingType = LoggingCategory::Off;
tmp.enabled = false;
break;
case KDebugSettingsUtil::LoadLoggingCategory::Info:
- tmp.loggingType =LoggingCategory::Info;
+ tmp.loggingType = LoggingCategory::Info;
break;
case KDebugSettingsUtil::LoadLoggingCategory::Warning:
- tmp.loggingType =LoggingCategory::Warning;
+ tmp.loggingType = LoggingCategory::Warning;
break;
case KDebugSettingsUtil::LoadLoggingCategory::Debug:
- tmp.loggingType =LoggingCategory::Debug;
+ tmp.loggingType = LoggingCategory::Debug;
break;
case KDebugSettingsUtil::LoadLoggingCategory::Critical:
- tmp.loggingType =LoggingCategory::Critical;
+ tmp.loggingType = LoggingCategory::Critical;
break;
case KDebugSettingsUtil::LoadLoggingCategory::All:
- tmp.loggingType =LoggingCategory::All;
+ tmp.loggingType = LoggingCategory::All;
break;
}
-;
tmp.enabled = (i.value() == \
KDebugSettingsUtil::LoadLoggingCategory::Enabled); mCustomCategories.append(tmp);
}
}
}
-
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic