summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/shared/debugutil_p.h
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-15 07:22:29 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-15 07:22:29 (GMT)
commitaf36be2c7257870e1ad094ec7b2cc37ae4ca2176 (patch)
tree5e69a670cad06f62f8a5b539105995cea00ae0aa /tests/auto/declarative/shared/debugutil_p.h
parentb258be1d39889e65411324fe5cda47a34f814033 (diff)
downloadQt-af36be2c7257870e1ad094ec7b2cc37ae4ca2176.zip
Qt-af36be2c7257870e1ad094ec7b2cc37ae4ca2176.tar.gz
Qt-af36be2c7257870e1ad094ec7b2cc37ae4ca2176.tar.bz2
For qmldebug* tests, make sure engine is running before the test thread
is started. Also fix some memory leaks.
Diffstat (limited to 'tests/auto/declarative/shared/debugutil_p.h')
-rw-r--r--tests/auto/declarative/shared/debugutil_p.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/auto/declarative/shared/debugutil_p.h b/tests/auto/declarative/shared/debugutil_p.h
index 313d16c..6f23899 100644
--- a/tests/auto/declarative/shared/debugutil_p.h
+++ b/tests/auto/declarative/shared/debugutil_p.h
@@ -51,6 +51,15 @@
#include <private/qmldebugservice_p.h>
#include <private/qmlgraphicsitem_p.h>
+class QmlTestFactory;
+
+class QmlDebugTest
+{
+public:
+ static bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000);
+
+ static int runTests(QmlTestFactory *factory, const QList<QByteArray> &qml = QList<QByteArray>());
+};
class QmlDebugTestData : public QObject
{
@@ -68,8 +77,14 @@ public:
QList<QmlGraphicsItem *> items;
+signals:
+ void engineCreated();
+
public slots:
void testsFinished(int code);
+
+private:
+ friend class QmlDebugTest;
};
@@ -82,14 +97,6 @@ public:
virtual QObject *createTest(QmlDebugTestData *data) = 0;
};
-
-namespace QmlDebugTest {
-
- bool waitForSignal(QObject *receiver, const char *member, int timeout = 5000);
-
- int runTests(QmlTestFactory *factory, const QList<QByteArray> &qml = QList<QByteArray>());
-}
-
class QmlDebugTestService : public QmlDebugService
{
Q_OBJECT
@@ -132,8 +139,6 @@ public:
void run();
- bool m_ready;
-
signals:
void testsFinished(int);