From 5eaecaa966c93d42279aaad5e44045279b328bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 16 Jan 2018 23:36:07 +0200 Subject: Undef interface in more places, fixing builds with libc++ on windows After including windows.h, interface is a define that expands to "struct" (unless WIN32_LEAN_AND_MEAN is defined). This name is used as a normal identifier in multiple places within Qt. This has already been worked around in a number of places (in e.g. 3ba61d9baa569ea69e41a943981680c09c521ff7 and 786d23bb4966b6697ac04c43158e2312d898e133). After qrandom.h was included in , this header implicitly includes . In libc++ on windows, this header then transitively includes windows.h, exposing the clash with the name "interface" in even more locations than before. For cases within qtbase internals, it could also alternatively be handled by defining WIN32_LEAN_AND_MEAN while building QtDbus, but for occurrences in public headers, the undef trick needs to be used. Change-Id: I89754f38f55ae7f2145255a2c8a71b23492be6a1 Reviewed-by: Thiago Macieira --- src/dbus/qdbusabstractadaptor_p.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dbus/qdbusabstractadaptor_p.h') diff --git a/src/dbus/qdbusabstractadaptor_p.h b/src/dbus/qdbusabstractadaptor_p.h index ed28777734..fb185cfb16 100644 --- a/src/dbus/qdbusabstractadaptor_p.h +++ b/src/dbus/qdbusabstractadaptor_p.h @@ -67,6 +67,10 @@ #ifndef QT_NO_DBUS +#ifdef interface +# undef interface +#endif + QT_BEGIN_NAMESPACE class QDBusAbstractAdaptor; -- cgit v1.2.3