summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/globals.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-04-23 12:00:17 +0200
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-04-24 12:57:10 +0000
commit2554ccb7ba4ef3103411e38b0c2d5d218217cccd (patch)
treec2ba19a0d5b834f2f5783c725dc115e3c3b4efbe /src/libs/installer/globals.cpp
parent61bf0345cdc86dc4053a5c2c1c3f782b5fd970ed (diff)
Enable logging categories as an installer option.
Now by default all categories are disabled. They get enabled only in verbose mode. Verbose mode enables all categories by default. Categories can be filtered using logging-rules option. Change-Id: I9324826a6e2d7a746e3d7369747fcd31a42b84b6 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/globals.cpp')
-rw-r--r--src/libs/installer/globals.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libs/installer/globals.cpp b/src/libs/installer/globals.cpp
index 05e19304e..43e5b4365 100644
--- a/src/libs/installer/globals.cpp
+++ b/src/libs/installer/globals.cpp
@@ -33,8 +33,24 @@
**************************************************************************/
#include "globals.h"
+const char IFW_COMPONENT_CHECKER[] = "ifw.componentChecker";
+
+namespace QInstaller
+{
+
+Q_LOGGING_CATEGORY(lcComponentChecker, IFW_COMPONENT_CHECKER)
+
Q_GLOBAL_STATIC_WITH_ARGS(QRegExp, staticCommaRegExp, (QLatin1String("\\b(,|, )\\b")));
-QRegExp QInstaller::commaRegExp()
+QRegExp commaRegExp()
{
return *staticCommaRegExp();
}
+
+QStringList loggingCategories()
+{
+ static QStringList categories = QStringList() << QLatin1String(IFW_COMPONENT_CHECKER);
+ return categories;
+}
+
+} // namespace QInstaller
+