diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2014-03-31 17:45:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-31 17:45:37 +0200 |
commit | bd822bedfea5126b12c32523a68c3a1ac7a8931d (patch) | |
tree | 0fafd5ac037e3b62ad45e8808989ec89155618b4 /src/corelib/io/qloggingregistry.cpp | |
parent | 84c10500b1730e8d947732728d190fde612fc840 (diff) | |
parent | 3b5c0bc0780f1749fed7c07bd8b691400a0282b7 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/io/qloggingregistry.cpp')
-rw-r--r-- | src/corelib/io/qloggingregistry.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index 23f1ffbd16..7e6883fd14 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -62,7 +62,6 @@ Q_GLOBAL_STATIC(QLoggingRegistry, qtLoggingRegistry) Constructs a logging rule with default values. */ QLoggingRule::QLoggingRule() : - flags(Invalid), enabled(false) { } @@ -73,7 +72,6 @@ QLoggingRule::QLoggingRule() : */ QLoggingRule::QLoggingRule(const QStringRef &pattern, bool enabled) : messageType(-1), - flags(Invalid), enabled(enabled) { parse(pattern); @@ -147,7 +145,6 @@ void QLoggingRule::parse(const QStringRef &pattern) p = pattern; } - flags = Invalid; if (!p.contains(QLatin1Char('*'))) { flags = FullText; } else { @@ -160,7 +157,7 @@ void QLoggingRule::parse(const QStringRef &pattern) p = QStringRef(p.string(), p.position() + 1, p.length() - 1); } if (p.contains(QLatin1Char('*'))) // '*' only supported at start/end - flags = Invalid; + flags = 0; } category = p.toString(); @@ -224,7 +221,11 @@ void QLoggingSettingsParser::setContent(QTextStream &stream) const QStringRef value = line.midRef(equalPos + 1); bool enabled = (value.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0); - _rules.append(QLoggingRule(pattern, enabled)); + QLoggingRule rule(pattern, enabled); + if (rule.flags != 0) + _rules.append(rule); + else + warnMsg("Ignoring malformed logging rule: '%s'", line.toUtf8().constData()); } } } |