summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2018-01-16 23:36:07 +0200
committerMartin Storsjö <martin@martin.st>2018-01-18 04:44:44 +0000
commit5eaecaa966c93d42279aaad5e44045279b328bda (patch)
tree041a1a00508998732e28173f7603c835fd0f6c8e /src/dbus
parent7ade6ac3c0e2842847a8df69eb6985fb4e52b3ff (diff)
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 <QtCore/QtCore>, this header implicitly includes <random>. 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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbus_symbols_p.h4
-rw-r--r--src/dbus/qdbusabstractadaptor_p.h4
-rw-r--r--src/dbus/qdbusconnection.h4
-rw-r--r--src/dbus/qdbusmetaobject_p.h4
4 files changed, 16 insertions, 0 deletions
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index cfc0e12046..9eaebe6d7e 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -63,6 +63,10 @@
# include "dbus_minimal_p.h"
#endif
+#ifdef interface
+# undef interface
+#endif
+
QT_BEGIN_NAMESPACE
#if !defined QT_LINKED_LIBDBUS
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;
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index ba28938b60..f801d6225c 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -47,6 +47,10 @@
#ifndef QT_NO_DBUS
+#ifdef interface
+# undef interface
+#endif
+
QT_BEGIN_NAMESPACE
diff --git a/src/dbus/qdbusmetaobject_p.h b/src/dbus/qdbusmetaobject_p.h
index 599358634b..89fccf9046 100644
--- a/src/dbus/qdbusmetaobject_p.h
+++ b/src/dbus/qdbusmetaobject_p.h
@@ -57,6 +57,10 @@
#ifndef QT_NO_DBUS
+#ifdef interface
+# undef interface
+#endif
+
QT_BEGIN_NAMESPACE
class QDBusError;