aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-05-04 15:13:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-04 15:20:42 +0200
commit31abe4e2cd65f1fdf9acec29effd85e6b1af73c3 (patch)
tree137414e4ddff4a005a60a95727367a970765aad0 /tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
parent3b66a38e58fe030b6d2c4cd12c9884af660652a9 (diff)
QQmlInspector: Use qmlscene in auto tests
Change-Id: I2f265409439183861c0d6d164247348db6097cb3 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp')
-rw-r--r--tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
index a105ff8de9..611dc2b843 100644
--- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -44,8 +44,10 @@
#include <QHostAddress>
#include <QDebug>
#include <QThread>
+#include <QtCore/QLibraryInfo>
#include "../shared/debugutil_p.h"
+#include "../../../shared/util.h"
#define PORT 3772
#define STR_PORT "3772"
@@ -79,7 +81,7 @@ public:
bool m_requestResult;
};
-class tst_QQmlInspector : public QObject
+class tst_QQmlInspector : public QQmlDataTest
{
Q_OBJECT
@@ -98,8 +100,6 @@ private:
QQmlInspectorClient *m_client;
private slots:
- void initTestCase();
- void cleanupTestCase();
void init();
void cleanup();
@@ -135,25 +135,12 @@ void QQmlInspectorClient::messageReceived(const QByteArray &message)
emit responseReceived();
}
-void tst_QQmlInspector::initTestCase()
-{
-}
-
-void tst_QQmlInspector::cleanupTestCase()
-{
-}
-
void tst_QQmlInspector::init()
{
-#if defined(Q_OS_WIN)
- const QString executable = "app\\app.exe";
-#else
- const QString executable = "app/app";
-#endif
const QString argument = "-qmljsdebugger=port:"STR_PORT",block";
- m_process = new QQmlDebugProcess(executable);
- m_process->start(QStringList() << argument);
+ m_process = new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene");
+ m_process->start(QStringList() << argument << testFile("qtquick2.qml"));
QVERIFY2(m_process->waitForSessionStart(),
"Could not launch application, or did not get 'Waiting for connection'.");