aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickmultipointtoucharea
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2012-03-14 16:42:58 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-15 11:25:36 +0100
commit21e228afa711ea040170445c649f725bedc394fe (patch)
tree09f21d51a63a43a871f27fd472dc10f742cae6f2 /tests/auto/quick/qquickmultipointtoucharea
parent5adfdaf9b33923f4cd2137c055aa549915b120d1 (diff)
Windows: Fix file URL issues in declarative autotests
Fixed by using testFileUrl() shared utility function where appropriate instead of testFile() or various other ways file URLs were being incorrectly used. Task-number: QTBUG-24779 Change-Id: I48cbd297d419238f42ea45132344b7e5a487b6f1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/quick/qquickmultipointtoucharea')
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro2
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro b/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro
index 8181eb8c5f..6816566c25 100644
--- a/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro
+++ b/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro
@@ -6,4 +6,6 @@ SOURCES += tst_qquickmultipointtoucharea.cpp
TESTDATA = data/*
+include(../../shared/util.pri)
+
QT += core-private gui-private qml-private quick-private testlib
diff --git a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
index 507612f8ce..1e0cd4eead 100644
--- a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
+++ b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp
@@ -44,14 +44,16 @@
#include <private/qquickmultipointtoucharea_p.h>
#include <private/qquickflickable_p.h>
#include <QtQuick/qquickview.h>
+#include "../../shared/util.h"
-class tst_QQuickMultiPointTouchArea: public QObject
+class tst_QQuickMultiPointTouchArea : public QQmlDataTest
{
Q_OBJECT
public:
tst_QQuickMultiPointTouchArea() : device(0) { }
private slots:
void initTestCase() {
+ QQmlDataTest::initTestCase();
if (!device) {
device = new QTouchDevice;
device->setType(QTouchDevice::TouchScreen);
@@ -714,7 +716,7 @@ void tst_QQuickMultiPointTouchArea::invisible()
QQuickView *tst_QQuickMultiPointTouchArea::createAndShowView(const QString &file)
{
QQuickView *canvas = new QQuickView(0);
- canvas->setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() + QLatin1String("/data/") + file));
+ canvas->setSource(testFileUrl(file));
canvas->show();
canvas->requestActivateWindow();
QTest::qWaitForWindowShown(canvas);