From f92e844b2b741d7d72a64052bea57de5aa04c3a7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 25 Feb 2013 10:27:19 -0800 Subject: Stop using function deprecated in D-Bus 1.2 (raise minimum version) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/dbus/qdbusintegrator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dbus/qdbusintegrator.cpp') diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index b6611c7517..839fe55901 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -244,7 +244,7 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data) QDBusConnectionPrivate *d = static_cast(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(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(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); -- cgit v1.2.3