From 6ce2a87c23bbaacece7d32df276f64a0058e447d Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Tue, 26 Mar 2019 14:07:03 +0100 Subject: 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 --- src/corelib/qtcore.tracepoints | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib') 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() -- cgit v1.2.3