Stop using function deprecated in D-Bus 1.2 (raise minimum version)

The dbus_watch_get_fd function was deprecated in D-Bus 1.2 (technically,
in 1.1.1, but that was a development release) because it had a bad name.
Sockets on Windows have file descriptors, but they are not shared from
the same pool as the CRT library's file descriptors.

This commit raises the minimum required version of D-Bus to 1.2. This is
the first requirement raise since this code was introduced in 2006. For
some reason, the D-Bus 1.2.0 release seems to be missing, but 1.2.1 was
released on 04-Apr-2008. That's ancient enough for all distributions
Qt 5 is supposed to run on.

Change-Id: Ia6bbc137fffbb27c77290ed3e32d3380f0ae3c54
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
bb10
Thiago Macieira 2013-02-25 10:27:19 -08:00 committed by The Qt Project
parent 996db96d5e
commit f92e844b2b
3 changed files with 5 additions and 5 deletions

2
configure vendored
View File

@ -751,7 +751,7 @@ QMakeVar add styles "mac fusion windows"
unset QTDIR
# the minimum version of libdbus-1 that we require:
MIN_DBUS_1_VERSION=0.93
MIN_DBUS_1_VERSION=1.2
# initalize internal variables
CFG_CONFIGURE_EXIT_ON_ERROR=yes

View File

@ -176,7 +176,7 @@ DEFINEFUNC(dbus_bool_t , dbus_timeout_handle, (DBusTimeout *timeout),
DEFINEFUNC(dbus_bool_t , dbus_watch_get_enabled, (DBusWatch *watch),
(watch), return)
DEFINEFUNC(int , dbus_watch_get_fd, (DBusWatch *watch),
DEFINEFUNC(int , dbus_watch_get_unix_fd, (DBusWatch *watch),
(watch), return)
DEFINEFUNC(unsigned int , dbus_watch_get_flags, (DBusWatch *watch),
(watch), return)

View File

@ -244,7 +244,7 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
int flags = q_dbus_watch_get_flags(watch);
int fd = q_dbus_watch_get_fd(watch);
int fd = q_dbus_watch_get_unix_fd(watch);
if (QCoreApplication::instance() && QThread::currentThread() == d->thread()) {
return qDBusRealAddWatch(d, watch, flags, fd);
@ -295,7 +295,7 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
//qDebug("remove watch");
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
int fd = q_dbus_watch_get_fd(watch);
int fd = q_dbus_watch_get_unix_fd(watch);
QDBusWatchAndTimeoutLocker locker(RemoveWatchAction, d);
QDBusConnectionPrivate::WatcherHash::iterator i = d->watchers.find(fd);
@ -326,7 +326,7 @@ static void qDBusToggleWatch(DBusWatch *watch, void *data)
Q_ASSERT(data);
QDBusConnectionPrivate *d = static_cast<QDBusConnectionPrivate *>(data);
int fd = q_dbus_watch_get_fd(watch);
int fd = q_dbus_watch_get_unix_fd(watch);
if (QCoreApplication::instance() && QThread::currentThread() == d->thread()) {
qDBusRealToggleWatch(d, watch, fd);