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>
This commit is contained in:
parent
d3cb97172f
commit
d7e2e943a2
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user