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

Change QSignalSpy connection type to AutoConnection

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.3.0, 5.3.1, 5.6.0
    • Testing: qtestlib
    • None
    • Every

    Description

      QSignalSpy is not thread-safe.
      QSignalSpy uses a DirectConnection.
      There is a QSignalSpy::wait() method. The existence of this method suggests to use it as a means to wait for a signal which was emitted by another thread. What else could we possibly wait for in a test scenario?
      But if we do so then we have an asynchronous write access to the inherited list by the other thread via the DirectConnection which leads to - well, undefined behaviour.
      IMHO this would easily be fixed if QSignalSpy used a AutoConnection.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            cyril4 Harald Prasser
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes