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.bb103ba61d9baaand786d23bb49). 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>
parent
7ade6ac3c0
commit
5eaecaa966
|
|
@ -48,6 +48,10 @@
|
|||
#include <QtCore/qthread.h>
|
||||
#include <private/qthreadpool_p.h>
|
||||
|
||||
#ifdef interface
|
||||
# undef interface
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
enum {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@
|
|||
# include "dbus_minimal_p.h"
|
||||
#endif
|
||||
|
||||
#ifdef interface
|
||||
# undef interface
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if !defined QT_LINKED_LIBDBUS
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@
|
|||
|
||||
#ifndef QT_NO_DBUS
|
||||
|
||||
#ifdef interface
|
||||
# undef interface
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDBusAbstractAdaptor;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@
|
|||
|
||||
#ifndef QT_NO_DBUS
|
||||
|
||||
#ifdef interface
|
||||
# undef interface
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@
|
|||
|
||||
#ifndef QT_NO_DBUS
|
||||
|
||||
#ifdef interface
|
||||
# undef interface
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDBusError;
|
||||
|
|
|
|||
Loading…
Reference in New Issue