summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbus_symbols.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-12-19 10:34:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-03-06 11:27:20 +0000
commitd6330a19b29ebff359a6746250c78437dbcaf77d (patch)
tree3ab0e390f0bfd30bb235ed5a0128bfd33e9cd4b7 /src/dbus/qdbus_symbols.cpp
parentf31dbeb4c7cd0d7559a8d7f523a3feea7d376186 (diff)
Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/dbus/qdbus_symbols.cpp')
-rw-r--r--src/dbus/qdbus_symbols.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index f91a8d2176..1e93a46c0c 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <QtCore/qglobal.h>
-#ifndef QT_BOOTSTRAPPED
+#if QT_CONFIG(library)
#include <QtCore/qlibrary.h>
#endif
#include <QtCore/qmutex.h>
@@ -54,7 +54,7 @@ void (*qdbus_resolve_me(const char *name))();
#if !defined QT_LINKED_LIBDBUS
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
static QLibrary *qdbus_libdbus = 0;
void qdbus_unloadLibDBus()
@@ -71,7 +71,7 @@ void qdbus_unloadLibDBus()
bool qdbus_loadLibDBus()
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
#ifdef QT_BUILD_INTERNAL
// this is to simulate a library load failure for our autotest suite.
if (!qEnvironmentVariableIsEmpty("QT_SIMULATE_DBUS_LIBFAIL"))
@@ -126,7 +126,7 @@ bool qdbus_loadLibDBus()
#endif
}
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
void (*qdbus_resolve_conditionally(const char *name))()
{
if (qdbus_loadLibDBus())
@@ -137,7 +137,7 @@ void (*qdbus_resolve_conditionally(const char *name))()
void (*qdbus_resolve_me(const char *name))()
{
-#ifndef QT_NO_LIBRARY
+#if QT_CONFIG(library)
if (Q_UNLIKELY(!qdbus_loadLibDBus()))
qFatal("Cannot find libdbus-1 in your system to resolve symbol '%s'.", name);
@@ -161,7 +161,7 @@ static void qdbus_unloadLibDBus()
#endif // !QT_LINKED_LIBDBUS
-#if defined(QT_LINKED_LIBDBUS) || !defined(QT_NO_LIBRARY)
+#if defined(QT_LINKED_LIBDBUS) || QT_CONFIG(library)
Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus)
#endif