diff options
Diffstat (limited to 'src/declarative/items/qsgcanvas.cpp')
-rw-r--r-- | src/declarative/items/qsgcanvas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qsgcanvas.cpp index 1ac14a0dea..f2a5ccb4e7 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qsgcanvas.cpp @@ -213,7 +213,7 @@ void QSGCanvas::showEvent(QShowEvent *e) d->contextInThread = true; doneCurrent(); if (!d->animationDriver) { - d->animationDriver = new QAnimationDriver(this); + d->animationDriver = d->context->createAnimationDriver(this); connect(d->animationDriver, SIGNAL(started()), this, SLOT(_q_animationStarted()), Qt::DirectConnection); connect(d->animationDriver, SIGNAL(stopped()), this, SLOT(_q_animationStopped()), Qt::DirectConnection); } @@ -227,7 +227,7 @@ void QSGCanvas::showEvent(QShowEvent *e) if (!d->context || !d->context->isReady()) { d->initializeSceneGraph(); - d->animationDriver = new QAnimationDriver(this); + d->animationDriver = d->context->createAnimationDriver(this); connect(d->animationDriver, SIGNAL(started()), this, SLOT(update())); } |