diff options
author | Robin Burchell <robin.burchell@theqtcompany.com> | 2015-09-24 09:14:29 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2015-09-27 09:49:55 +0000 |
commit | 6a2e0e88ad49963bb51af0d9ded2c4e0e4cd7146 (patch) | |
tree | a091f4961794cc52a203d3ba6590cf317c431dfa /src/quick/util/qquickanimatorjob.cpp | |
parent | f9ef039ad955db67dc3ab6e9056afc4a325aa9a3 (diff) |
QQuickAnimatorJob: Convert a regular connect to qmlobject_connect.
Spotted while profiling an application with a large number of OpacityAnimators.
qmlobject_connect is around 1/3 the time of a regular connect.
Change-Id: Ib37d79c6478d13c1acb6b191b635d9780c22ed00
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/util/qquickanimatorjob.cpp')
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index 0182f8abfb..d0330398e5 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -79,7 +79,8 @@ QQuickAnimatorProxyJob::QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QObje QQuickItem *item = qobject_cast<QQuickItem *>(ctx); if (item->window()) setWindow(item->window()); - connect(item, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(windowChanged(QQuickWindow*))); + + qmlobject_connect(item, QQuickItem, SIGNAL(windowChanged(QQuickWindow*)), this, QQuickAnimatorProxyJob, SLOT(windowChanged(QQuickWindow*))); } } |