diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-30 06:03:29 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-30 06:03:29 (GMT) |
commit | ff983ee8257b79143911ca58ebedc49b1660a0c4 (patch) | |
tree | c09ee8766332604a63874b7ac4ce1816afda1b9a /src/declarative/graphicsitems/qdeclarativeitem.cpp | |
parent | 8368e041e35ab2a79c79f651a56e6ee53a46549f (diff) | |
download | Qt-ff983ee8257b79143911ca58ebedc49b1660a0c4.zip Qt-ff983ee8257b79143911ca58ebedc49b1660a0c4.tar.gz Qt-ff983ee8257b79143911ca58ebedc49b1660a0c4.tar.bz2 |
Make qmlpixmapcache thread shutdown cleaner
Change to Thiago's method:
QThread::quit() is *not* thread-safe, so we mustn't call it from
outside the QThread that the QThread holds. Unlike other QObjects,
this method and some others must not be called from the thread they
have affinity to.
So add a hack to call it in the auxiliary thread. Do that by
connecting a dummy QObject's destroyed() signal to the quit() slot in
a DirectConnection, then move the object to the thread. When we call
deleteLater(), this will cause the thread's event loop to delete the
object, which in turn calls quit() in the actual thread.
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
0 files changed, 0 insertions, 0 deletions