summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstyleanimation.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-10-23 10:53:40 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-23 11:41:47 +0200
commit7abf6234436aee377d15f9f2f1d37ee7daf7464e (patch)
treec32cc20bc12d473746a5f225fb207e1cf772e0c6 /src/widgets/styles/qstyleanimation.cpp
parent2e2133247677fbdf81741badf523a00612826a37 (diff)
QStyleAnimation: fix threaded rendering
Change-Id: I00875adf2e4b157a3f8b0b99e5280b1275635026 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/styles/qstyleanimation.cpp')
-rw-r--r--src/widgets/styles/qstyleanimation.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp
index 6173dc9ddb..9f58c9d51f 100644
--- a/src/widgets/styles/qstyleanimation.cpp
+++ b/src/widgets/styles/qstyleanimation.cpp
@@ -47,9 +47,14 @@
QT_BEGIN_NAMESPACE
-QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(target),
+QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(),
_startTime(QTime::currentTime())
{
+ if (target) {
+ moveToThread(target->thread());
+ setParent(target);
+ }
+ connect(this, SIGNAL(finished()), SLOT(deleteLater()));
}
QStyleAnimation::~QStyleAnimation()