Fix threaded request synchronization issues
authorKonstantin Ritt <ritt.ks@gmail.com>
Tue, 14 Jan 2014 04:55:08 +0000 (06:55 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 17 Jan 2014 12:41:06 +0000 (13:41 +0100)
commit105868cd760f0897c57b102d9c5ffefafe254b20
treee70fab65e5ce2d1b90e8ba2705155285ce169711
parentb9d5f9417cd7bb1e25b6ec7819d9997de6c03da4
Fix threaded request synchronization issues

Like it was predicted, 26b2eab752073dc1d8b5769b7cfe307b9982e5b3
encovered the undefined behavior with the request notification
synchronization in case when the request gets updated from within
another thread - i.e. resultAvailable() or stateChanged() notification
could be delivered after the request has been destroyed.

Change-Id: I3411391511ae61d6aa8feb00b1cb0d1f7c431a25
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
src/contacts/qcontactmanagerengine.cpp
src/organizer/qorganizermanagerengine.cpp
tests/auto/contacts/qcontactasync/maliciousplugin/maliciousplugin.cpp
tests/auto/organizer/qorganizeritemasync/maliciousplugin/malicious.json [new file with mode: 0644]
tests/auto/organizer/qorganizeritemasync/maliciousplugin/maliciousplugin.cpp [new file with mode: 0644]
tests/auto/organizer/qorganizeritemasync/maliciousplugin/maliciousplugin.pro [new file with mode: 0644]
tests/auto/organizer/qorganizeritemasync/maliciousplugin/maliciousplugin_p.h [new file with mode: 0644]
tests/auto/organizer/qorganizeritemasync/qorganizeritemasync.pro
tests/auto/organizer/qorganizermanager/tst_qorganizermanager.cpp
tests/auto/organizer/qorganizermanagerdetails/tst_qorganizermanagerdetails.cpp