From 6df89c3b9d4e88d600c80aa3f39718fcab14fc6f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 19 Feb 2014 12:20:20 +0100 Subject: Add a signal for syncing external animation systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ChangeLog] QQuickWindow will now emit the afterAnimating() signal from the gui thread before each scenegraph sync request. Change-Id: I4897c82f75066238e781455d4fce4fb6bbe2558e Reviewed-by: Pasi Keränen Reviewed-by: Lars Knoll --- tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/auto/quick/qquickwindow') diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index bdd70f6a6e..edde8d2134 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -351,6 +351,8 @@ private slots: void cursor(); #endif + void animatingSignal(); + private: QTouchDevice *touchDevice; QTouchDevice *touchDeviceWithVelocity; @@ -1657,6 +1659,19 @@ void tst_qquickwindow::qobjectEventFilter_mouse() QTest::mouseRelease(&window, Qt::LeftButton, Qt::NoModifier, point); } +void tst_qquickwindow::animatingSignal() +{ + QQuickWindow window; + window.setGeometry(100, 100, 300, 200); + + QSignalSpy spy(&window, SIGNAL(afterAnimating())); + + window.show(); + QTRY_VERIFY(window.isExposed()); + + QTRY_VERIFY(spy.count() > 1); +} + QTEST_MAIN(tst_qquickwindow) #include "tst_qquickwindow.moc" -- cgit v1.2.3