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

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.11.3
    • Fix Version/s: 5.12.4
    • Component/s: QML: Tooling
    • Labels:
      None
    • Environment:
      Ubuntu 20.10 / X11
    • Platform/s:
      Linux/X11
    • Commits:
      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

            Assignee:
            ulherman Ulf Hermann
            Reporter:
            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