diff options
author | Kai Koehne <kai.koehne@digia.com> | 2014-02-21 11:39:12 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-13 13:26:14 +0100 |
commit | b3871dc8049819ae3e095555f451457567eb4ee3 (patch) | |
tree | 8708c19f75e3022ff25ef74047c051b52c1a9682 /src/corelib/io/qloggingregistry_p.h | |
parent | f6d0c67d30ef1c22b086641e8d1288e1baaa1663 (diff) |
Make parsing of categories in logging rules consistent.
The documentation says that the left side of a logging rule has the syntax
<category>[.<type>]
with optional wildcard '*' as the first or the last character (or at
both positions.
However, so far we didn't allow
qt.*.debug
But what we did allow is implicit dropping of trailing '.', e.g.
qt.* matched also 'qt'
Fix these by splitting up the '.type' in advance, and then do string
matching only on the 'real' category names.
Change-Id: Iab50ad0fc673464e870f5ab8dfb3245d829b3107
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qloggingregistry_p.h')
-rw-r--r-- | src/corelib/io/qloggingregistry_p.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qloggingregistry_p.h b/src/corelib/io/qloggingregistry_p.h index d4b97d42b8..70d728228c 100644 --- a/src/corelib/io/qloggingregistry_p.h +++ b/src/corelib/io/qloggingregistry_p.h @@ -64,7 +64,7 @@ class tst_QLoggingRegistry; QT_BEGIN_NAMESPACE -class QLoggingRule +class Q_AUTOTEST_EXPORT QLoggingRule { public: QLoggingRule(); @@ -80,12 +80,13 @@ public: }; Q_DECLARE_FLAGS(PatternFlags, PatternFlag) - QString pattern; + QString category; + int messageType; PatternFlags flags; bool enabled; private: - void parse(); + void parse(const QString &pattern); }; Q_DECLARE_OPERATORS_FOR_FLAGS(QLoggingRule::PatternFlags) |