-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
None
-
We have problems with Qt not doing push_thread_default in Maemo6 / Harmattan
-
aa88b7044dd86850e6986aa80104bb38bb7b12eb:master
Qt's GMainLoop integration should use g_main_context_push_thread_default to push the GMainContext that is created for a newly created QThread to GLib. This way applications and libraries that use threads (like DBus libraries) can access the GMainContext by asking for g_main_context_get_thread_default (for example to execute asynchronous methods' callbacks on).
The TLS free function in GLib would clean up the registration, but it's more correct to use g_main_context_pop_thread_default when the context is disposed.
I have attached a patch that adds the push and popping of the GMainContext to Qt's QEventDispatcher.