summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-11 03:13:14 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-11 03:13:14 (GMT)
commit199d5e4f0a0e72fef2c59aaefe1f843592db937e (patch)
treed8e39e722eff8fd2f79505e352f24ff3f894619a
parent8d8b2e46a7c0a7323ecbbbddc772fdb240d4373d (diff)
downloadQt-199d5e4f0a0e72fef2c59aaefe1f843592db937e.zip
Qt-199d5e4f0a0e72fef2c59aaefe1f843592db937e.tar.gz
Qt-199d5e4f0a0e72fef2c59aaefe1f843592db937e.tar.bz2
Clean up
-rw-r--r--tests/auto/declarative/qmldebug/tst_qmldebug.cpp2
-rw-r--r--tests/auto/declarative/qmldebugclient/tst_qmldebugclient.cpp5
-rw-r--r--tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp4
-rw-r--r--tests/auto/declarative/shared/debugutil.cpp1
-rw-r--r--tests/auto/declarative/shared/debugutil_p.h2
5 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/declarative/qmldebug/tst_qmldebug.cpp b/tests/auto/declarative/qmldebug/tst_qmldebug.cpp
index 7615f9b..82e74ce 100644
--- a/tests/auto/declarative/qmldebug/tst_qmldebug.cpp
+++ b/tests/auto/declarative/qmldebug/tst_qmldebug.cpp
@@ -330,9 +330,11 @@ void tst_QmlDebug::watch_object()
QmlDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this);
waitForQuery(q_engines);
+ Q_ASSERT(q_engines->engines().count() > 0);
QmlDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this);
waitForQuery(q_context);
+ Q_ASSERT(q_context->rootContext().objects().count() > 0);
QmlDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[0], this);
waitForQuery(q_obj);
diff --git a/tests/auto/declarative/qmldebugclient/tst_qmldebugclient.cpp b/tests/auto/declarative/qmldebugclient/tst_qmldebugclient.cpp
index 8325731..4ee0837 100644
--- a/tests/auto/declarative/qmldebugclient/tst_qmldebugclient.cpp
+++ b/tests/auto/declarative/qmldebugclient/tst_qmldebugclient.cpp
@@ -62,11 +62,9 @@ public:
tst_QmlDebugClient(QmlDebugTestData *data)
{
m_conn = data->conn;
- m_engine = data->engine;
}
QmlDebugConnection *m_conn;
- QmlEngine *m_engine;
private slots:
void name();
@@ -145,6 +143,9 @@ public:
QObject *createTest(QmlDebugTestData *data) { return new tst_QmlDebugClient(data); }
};
+
+// This does not use QTEST_MAIN because the test has to be created and run
+// in a separate thread.
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp b/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp
index 625d1f5..4e7bc27 100644
--- a/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp
+++ b/tests/auto/declarative/qmldebugservice/tst_qmldebugservice.cpp
@@ -62,11 +62,9 @@ public:
tst_QmlDebugService(QmlDebugTestData *data)
{
m_conn = data->conn;
- m_engine = data->engine;
}
QmlDebugConnection *m_conn;
- QmlEngine *m_engine;
private slots:
void name();
@@ -178,6 +176,8 @@ public:
QObject *createTest(QmlDebugTestData *data) { return new tst_QmlDebugService(data); }
};
+// This does not use QTEST_MAIN because the test has to be created and run
+// in a separate thread.
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp
index 677c6cd..aa0cd31 100644
--- a/tests/auto/declarative/shared/debugutil.cpp
+++ b/tests/auto/declarative/shared/debugutil.cpp
@@ -168,7 +168,6 @@ int QmlDebugTest::runTests(QmlTestFactory *factory, const QList<QByteArray> &qml
thread.m_ready = true;
loop.exec();
-
thread.wait();
return data.exitCode;
diff --git a/tests/auto/declarative/shared/debugutil_p.h b/tests/auto/declarative/shared/debugutil_p.h
index cb20f5c..313d16c 100644
--- a/tests/auto/declarative/shared/debugutil_p.h
+++ b/tests/auto/declarative/shared/debugutil_p.h
@@ -60,8 +60,8 @@ public:
~QmlDebugTestData();
- QmlEngine *engine;
QmlDebugConnection *conn;
+ QmlEngine *engine;
int exitCode;
QEventLoop *loop;