summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-11-15 07:37:16 -0800
committerThiago Macieira <thiago.macieira@intel.com>2016-11-26 07:13:45 +0000
commit20526cb01466105c0e4ed1430ac9722f3dddf60a (patch)
treef61be7ee4997754d69adb1b103be925be69c67d5 /src/corelib/global/qlogging.cpp
parent50aeedd86ce0244fbb77ebefdce8da72db881e45 (diff)
Make sure all pattern args get cleared when parsing a new pattern
The user can call qSetMessagePattern after program start, so we need to be sure that the parsed argument data is properly cleared. Task-number: QTBUG-57144 Change-Id: I1978c6b95bd84639a8c4fffd1487429b04725522 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 22b75afac8..e1b8ef4b6d 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -1039,6 +1039,10 @@ void QMessagePattern::setPattern(const QString &pattern)
delete [] literals;
}
delete [] tokens;
+ timeArgs.clear();
+#ifdef QLOGGING_HAVE_BACKTRACE
+ backtraceArgs.clear();
+#endif
// scanner
QList<QString> lexemes;