summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_glib.cpp
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-11-19 10:21:30 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-11-19 10:21:30 (GMT)
commitab13e9c099a505a821caaccc6ae252388e676083 (patch)
tree503fe8c32d30c0e408defc0d7c54d47eeb2d6cc0 /src/corelib/kernel/qeventdispatcher_glib.cpp
parent4258dd04e25c8831be9e8a7dc45b52d34782cb35 (diff)
parent72378ce571bcb88d0519a1b02d0e543b5237d613 (diff)
downloadQt-ab13e9c099a505a821caaccc6ae252388e676083.zip
Qt-ab13e9c099a505a821caaccc6ae252388e676083.tar.gz
Qt-ab13e9c099a505a821caaccc6ae252388e676083.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-water-team into 4.7
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_glib.cpp')
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 8390275..6fa2707 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -311,6 +311,10 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
}
}
+#if GLIB_CHECK_VERSION (2, 22, 0)
+ g_main_context_push_thread_default (mainContext);
+#endif
+
// setup post event source
postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
sizeof(GPostEventSource)));
@@ -389,6 +393,9 @@ QEventDispatcherGlib::~QEventDispatcherGlib()
d->postEventSource = 0;
Q_ASSERT(d->mainContext != 0);
+#if GLIB_CHECK_VERSION (2, 22, 0)
+ g_main_context_pop_thread_default (d->mainContext);
+#endif
g_main_context_unref(d->mainContext);
d->mainContext = 0;
}