summaryrefslogtreecommitdiffstats
path: root/src/sdk
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-04-24 13:32:57 +0200
committerJarek Kobus <jaroslaw.kobus@theqtcompany.com>2015-04-24 12:58:49 +0000
commitc522fd5de907fb264e24eed842e28d9ac56bce0c (patch)
treea2110fe689c40f58ae94f8fc05b59f16436f30f5 /src/sdk
parent2554ccb7ba4ef3103411e38b0c2d5d218217cccd (diff)
Add more logging categories.
Change-Id: I1c7dabfd16a69ef5a3e5aaa490036de061f1fd13 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/sdk')
-rw-r--r--src/sdk/commandlineparser.cpp2
-rw-r--r--src/sdk/installerbase.cpp17
2 files changed, 11 insertions, 8 deletions
diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp
index abf8abea6..4a1f0080f 100644
--- a/src/sdk/commandlineparser.cpp
+++ b/src/sdk/commandlineparser.cpp
@@ -82,6 +82,8 @@ CommandLineParser::CommandLineParser()
"Comma separated logging rules have the following syntax: "
"loggingCategory=true/false. "
"Passing empty logging rules enables all logging categories. "
+ "The following rules enable a single category: "
+ "ifw.*=false,ifw.category=true "
"The following logging categories are available:\n")
+ QInstaller::loggingCategories().join(QLatin1Char('\n')),
QLatin1String("rules")));
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index cff394e78..343a0a1ca 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -51,6 +51,7 @@
#include <productkeycheck.h>
#include <settings.h>
#include <utils.h>
+#include <globals.h>
#include <kdrunoncechecker.h>
#include <kdupdaterfiledownloaderfactory.h>
@@ -111,10 +112,6 @@ int InstallerBase::run()
QString loggingRules(QLatin1String("ifw.* = false")); // disable all by default
if (QInstaller::isVerbose()) {
- qDebug() << "Language:" << QLocale().uiLanguages().value(0,
- QLatin1String("No UI language set")).toUtf8().constData();
- qDebug() << "Arguments: " << arguments().join(QLatin1String(", ")).toUtf8().constData();
-
loggingRules = QString(); // enable all in verbose mode
if (parser.isSet(QLatin1String(CommandLineOptions::LoggingRules))) {
loggingRules = parser.value(QLatin1String(CommandLineOptions::LoggingRules))
@@ -124,6 +121,10 @@ int InstallerBase::run()
}
QLoggingCategory::setFilterRules(loggingRules);
+ qCDebug(QInstaller::lcTranslations) << "Language:" << QLocale().uiLanguages()
+ .value(0, QLatin1String("No UI language set")).toUtf8().constData();
+ qDebug() << "Arguments: " << arguments().join(QLatin1String(", ")).toUtf8().constData();
+
SDKApp::registerMetaResources(manager.collectionByName("QResources"));
if (parser.isSet(QLatin1String(CommandLineOptions::StartClient))) {
const QStringList arguments = parser.value(QLatin1String(CommandLineOptions::StartClient))
@@ -144,8 +145,8 @@ int InstallerBase::run()
ProductKeyCheck::instance()->addPackagesFromXml(QLatin1String(":/metadata/Updates.xml"));
BinaryFormatEngineHandler::instance()->registerResources(manager.collections());
}
- if (QInstaller::isVerbose())
- dumpResourceTree();
+
+ dumpResourceTree();
QString controlScript;
if (parser.isSet(QLatin1String(CommandLineOptions::Script))) {
@@ -294,13 +295,13 @@ int InstallerBase::run()
void InstallerBase::dumpResourceTree() const
{
- qDebug() << "Resource tree:";
+ qCDebug(QInstaller::lcResources) << "Resource tree:";
QDirIterator it(QLatin1String(":/"), QDir::NoDotAndDotDot | QDir::AllEntries | QDir::Hidden,
QDirIterator::Subdirectories);
while (it.hasNext()) {
if (it.next().startsWith(QLatin1String(":/qt-project.org")))
continue;
- qDebug() << " " << it.filePath().toUtf8().constData();
+ qCDebug(QInstaller::lcResources) << " " << it.filePath().toUtf8().constData();
}
}