summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-14 22:57:11 -0700
committerMarc Mutz <marc.mutz@kdab.com>2016-04-23 12:33:22 +0000
commit721d7d383df512bc4dea79b85601d01df576117f (patch)
tree05a20d0e5acbd073cca032bfac0624a7b6e8d35c /src/corelib/global
parent16fa29352b7402c82624d6367231f67de836d17e (diff)
QMessagePattern: Fix indentation and use QVector for a large struct
struct BacktraceParams is too big (more than one pointer), so using it with QList is inefficient. Let's use QVector instead. Change-Id: Id75834dab9ed466e94c7ffff144572c1eb3fb0e5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qlogging.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 86b9597609..6cd2d7914b 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -986,15 +986,18 @@ struct QMessagePattern {
#endif
#ifdef QLOGGING_HAVE_BACKTRACE
struct BacktraceParams {
- QString backtraceSeparator;
- int backtraceDepth;
+ QString backtraceSeparator;
+ int backtraceDepth;
};
- QList<BacktraceParams> backtraceArgs; // backtrace argumens in sequence of %{backtrace
+ QVector<BacktraceParams> backtraceArgs; // backtrace argumens in sequence of %{backtrace
#endif
bool fromEnvironment;
static QBasicMutex mutex;
};
+#ifdef QLOGGING_HAVE_BACKTRACE
+Q_DECLARE_TYPEINFO(QMessagePattern::BacktraceParams, Q_MOVABLE_TYPE);
+#endif
QBasicMutex QMessagePattern::mutex;