Don't try to dynamically resolve dbus symbols if QT_NO_LIBRARY

Change-Id: I9e307653229c04746d66d3a9f3b3e46ea9a42381
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ulf Hermann 2015-07-20 15:13:48 +02:00
parent 0ec809e027
commit efa379b9d5
2 changed files with 5 additions and 1 deletions

View File

@ -1079,7 +1079,7 @@ static bool canSendUnixFd(DBusConnection *connection)
# if DBUS_VERSION-0 >= 0x010400 # if DBUS_VERSION-0 >= 0x010400
can_send_type = dbus_connection_can_send_type; can_send_type = dbus_connection_can_send_type;
# endif # endif
#else #elif !defined(QT_NO_LIBRARY)
// run-time check if the next functions are available // run-time check if the next functions are available
can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type"); can_send_type = (can_send_type_t)qdbus_resolve_conditionally("dbus_connection_can_send_type");
#endif #endif

View File

@ -94,7 +94,11 @@ static void addFixedTypes()
// the library recognizes this as valid type first. // the library recognizes this as valid type first.
// The following function was added for Unix FD support, so if it is // The following function was added for Unix FD support, so if it is
// present, so is support for Unix FDs. // present, so is support for Unix FDs.
# ifndef QT_NO_LIBRARY
bool supportsUnixFds = qdbus_resolve_conditionally("dbus_connection_can_send_type"); bool supportsUnixFds = qdbus_resolve_conditionally("dbus_connection_can_send_type");
# else
bool supportsUnixFds = false;
# endif
# else # else
bool supportsUnixFds = true; bool supportsUnixFds = true;
# endif # endif