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

QAbstractNativeEventFilter won't receive event when QT_QML_DEBUG is defined and the QApplication is started from a thread

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Not Evaluated
    • Resolution: Done
    • 5.11.3
    • 5.12.4
    • QML: Tooling
    • None
    • Ubuntu 20.10 / X11
    • Linux/X11
    • 15525d2a309a6028d548797bc777e38905f36c46

    Description

      QAbstractNativeEventFilter won't receive event when QT_QML_DEBUG is defined and the QApplication is started from a thread

      My understanding is that using QT_QML_DEBUG will run some static code upon initialization (it instantiate a QQmlDebuggingEnabler), this will create some Thread Local Storage data (when using QDebug) so the thread of the "main()" will be considered as the main thread. Later on, when registering a QAbstractNativeEventFilter, it will be registered in the TLS of this thread, whereas the native events are sent to the thread of the QApplication

      I attached a sample to reproduce the issue.

      The problem doesn't seems to occurs in newer version (I tested it with 5.12.8 and 5.15.1)

      I don't know if I can expect this bug to be fixed as 5.11 is not an LTS version.

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            chub Pierre Lamot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes