Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-14425

GLib >= 2.22 requires use of g_main_context_push_thread_default in QEventDispatcher when a QThread is created

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.8.0
    • 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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            pvanhoof Philip Van Hoof
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes