path: root/examples/widgets/tools
diff options
authorTimur Pocheptsov <>2017-02-15 09:43:45 +0100
committerTimur Pocheptsov <>2017-02-16 15:52:42 +0000
commitde225ccdf95efb57866d62bc80872c1a2ab99703 (patch)
tree8f394781d150ab76680c0d56e048a3ceb2b3973f /examples/widgets/tools
parent1aaf45e10680242511c047d84ec4f1c9a86cda7f (diff)
QNetworkSession - register types before connecting slots
QNetworkSession's ctor has a race condition: it 1) connects signals/slots and also 2) registers meta-types (but after these connects). Our users apparently have a lot of per-thread QNAMs in multiple threads (and implicitly many QNetworkSessions on different threads too). From error logs it appears that while one thread tries to connect signals/slots and evaluates the types of signal and slot arguments, another thread can register this type. If the first thread extracted signal argument types, then the second registered this type, we can end up in a 'type mismatch' error on the first thread with seemingly the same types in a debug message (something like "type mismatch A::Some <-> A::Some") - they have the same name, but one has type() == 0 and another - some non-zero type(). Now we call qRegisterMetaType before connect. Task-number: QTBUG-50901 Change-Id: Idbb9515573e174bbc5e5bf55dc3a7911a81646ea Reviewed-by: Olivier Goffart (Woboq GmbH) <> Reviewed-by: Timur Pocheptsov <>
Diffstat (limited to 'examples/widgets/tools')
0 files changed, 0 insertions, 0 deletions