summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2019-03-26 14:07:03 +0100
committerMilian Wolff <milian.wolff@kdab.com>2019-04-05 11:57:39 +0000
commit6ce2a87c23bbaacece7d32df276f64a0058e447d (patch)
treeb0500378205664a2da5162e44973a159bffe0958 /src/corelib
parentdf7eec6bcb0b9fdee3888c9b4683dbb533eba300 (diff)
Forward declare all types required for compilation with `-trace`
This patch fixes compilation with `-trace lttng` or `-trace etw`. We need to forward declare QEvent, QImageReader etc., otherwise the types will be unknown while compiling the trace points. In order to handle this generically, the tracegen utility is extended to support a 'prefix text' in the `*.tracepoints` input files. Any text within curly braces will be embedded as-is in the generated file. This can then be used to add forward declarations for the types we need, including potential namespaces and such. Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/qtcore.tracepoints6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/qtcore.tracepoints b/src/corelib/qtcore.tracepoints
index 33734a4274..a9a08071f3 100644
--- a/src/corelib/qtcore.tracepoints
+++ b/src/corelib/qtcore.tracepoints
@@ -1,3 +1,9 @@
+{
+QT_BEGIN_NAMESPACE
+class QEvent;
+QT_END_NAMESPACE
+}
+
QCoreApplicationPrivate_init_entry()
QCoreApplicationPrivate_init_exit()