summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-11 17:20:40 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-06-16 06:31:42 +0000
commitd7e2e943a2c10bd7b5113770574a65fd832c34c1 (patch)
tree129c3a07a1643c454bfe561eace2195f7f55998f /src/dbus
parentd3cb97172fec47e81cec338a3b695946f667b8c9 (diff)
Fix conditions for disabling dbus dynamic symbol lookup
We cannot do this if no library support is present. Incidentally that's the case when bootstrapping, but you can also set the flag manually. Change-Id: I51e167176d0839af5858122630ef623a1c69a106 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbus_symbols.cpp10
-rw-r--r--src/dbus/qdbusintegrator.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index b82d92b561..d178a37353 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -48,7 +48,7 @@ void (*qdbus_resolve_me(const char *name))();
#if !defined QT_LINKED_LIBDBUS
-#ifndef QT_BOOTSTRAPPED
+#ifndef QT_NO_LIBRARY
static QLibrary *qdbus_libdbus = 0;
void qdbus_unloadLibDBus()
@@ -65,7 +65,7 @@ void qdbus_unloadLibDBus()
bool qdbus_loadLibDBus()
{
-#ifndef QT_BOOTSTRAPPED
+#ifndef QT_NO_LIBRARY
#ifdef QT_BUILD_INTERNAL
// this is to simulate a library load failure for our autotest suite.
if (!qEnvironmentVariableIsEmpty("QT_SIMULATE_DBUS_LIBFAIL"))
@@ -118,7 +118,7 @@ bool qdbus_loadLibDBus()
#endif
}
-#ifndef QT_BOOTSTRAPPED
+#ifndef QT_NO_LIBRARY
void (*qdbus_resolve_conditionally(const char *name))()
{
if (qdbus_loadLibDBus())
@@ -129,7 +129,7 @@ void (*qdbus_resolve_conditionally(const char *name))()
void (*qdbus_resolve_me(const char *name))()
{
-#ifndef QT_BOOTSTRAPPED
+#ifndef QT_NO_LIBRARY
if (!qdbus_loadLibDBus())
qFatal("Cannot find libdbus-1 in your system to resolve symbol '%s'.", name);
@@ -153,7 +153,7 @@ static void qdbus_unloadLibDBus()
#endif // !QT_LINKED_LIBDBUS
-#ifndef QT_BOOTSTRAPPED
+#ifndef QT_NO_LIBRARY
Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus)
#endif
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index b310483d11..8156ab5235 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1730,7 +1730,7 @@ static QDBusConnection::ConnectionCapabilities connectionCapabilies(DBusConnecti
# if DBUS_VERSION-0 >= 0x010400
can_send_type = dbus_connection_can_send_type;
# endif
-#else
+#elif !defined(QT_NO_LIBRARY)
// run-time check if the next functions are available
can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type");
#endif