summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-03-11 13:56:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-12 23:16:29 +0100
commit3372b0faa74114184afbfde20a3bc27049df2c94 (patch)
tree926d5cbc516988ac39c8997371d38abea6f74314
parent29daf4ddf9151bd897791b7634a44ef64417bec6 (diff)
g_thread_init is deprecated
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 <Friedemann.Kleint@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp2
1 files changed, 2 insertions, 0 deletions
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);