From 3372b0faa74114184afbfde20a3bc27049df2c94 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 11 Mar 2013 13:56:12 +0100 Subject: g_thread_init is deprecated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since glib 2.32 this function is just an empty body. Fix the warning and don't try to call it. There seems to be no way to disable threading in glib. Change-Id: Id30e606d341bd6ef871737275336f6c6b3b2559b Reviewed-by: Friedemann Kleint Reviewed-by: Jędrzej Nowacki --- src/corelib/kernel/qeventdispatcher_glib.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 75cd88c456..17830868da 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -293,12 +293,14 @@ static GSourceFuncs postEventSourceFuncs = { QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) : mainContext(context) { +#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32 if (qEnvironmentVariableIsEmpty("QT_NO_THREADED_GLIB")) { static QBasicMutex mutex; QMutexLocker locker(&mutex); if (!g_thread_supported()) g_thread_init(NULL); } +#endif if (mainContext) { g_main_context_ref(mainContext); -- cgit v1.2.3