summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2014-10-13 02:24:05 -0700
committerSzabolcs David <davidsz@inf.u-szeged.hu>2014-10-14 00:43:39 +0200
commit8a5db798420903e6a2753e2f6651ead19243a423 (patch)
treef0d5ca76ffbedb7315fd4c87f2d184b5ddb297e1 /tests
parent11a957a477822093d9ee4ef8103c3e059a99072f (diff)
Use the shared waitForSignal method in QQuickWebEngineViewGraphics test
Change-Id: Ie27e4af5f4517bb1e1eea1262ab32140b3dff816 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
index af57df7e..b69cdd15 100644
--- a/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
+++ b/tests/auto/quick/qquickwebengineviewgraphics/tst_qquickwebengineviewgraphics.cpp
@@ -39,6 +39,8 @@
**
****************************************************************************/
+#include "util.h"
+
#include <QtTest/QtTest>
#include <QQmlContext>
#include <QQuickView>
@@ -99,21 +101,6 @@ static QImage get150x150GreenReferenceImage()
return reference;
}
-static inline bool waitForSignal(QObject *obj, const char *signal, int timeout = 10000)
-{
- QEventLoop loop;
- QObject::connect(obj, signal, &loop, SLOT(quit()));
- QTimer timer;
- QSignalSpy timeoutSpy(&timer, SIGNAL(timeout()));
- if (timeout > 0) {
- QObject::connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit()));
- timer.setSingleShot(true);
- timer.start(timeout);
- }
- loop.exec();
- return timeoutSpy.isEmpty();
-}
-
tst_QQuickWebEngineViewGraphics::tst_QQuickWebEngineViewGraphics()
{
}