Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.3.0, 5.3.1, 5.6.0
-
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.