diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-03-07 22:00:57 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-03-07 22:01:11 +0100 |
commit | 616bbd1988f3b92f7d980b6c9a1278f11b712573 (patch) | |
tree | c6f9489bc1b53649130be21de858870f574db906 /tests | |
parent | 3bc907d155034fe64efc8cb6056b48f0c6401bfb (diff) | |
parent | 70966df1be02dd94ecf9a122ff9e4976245aeb92 (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Change-Id: I121cb9c9316b5e47476dcb982bc28b6f3f358f78
Diffstat (limited to 'tests')
162 files changed, 745 insertions, 463 deletions
diff --git a/tests/auto/particles/qquickage/qquickage.pro b/tests/auto/particles/qquickage/qquickage.pro index 6616ec45ee..99c768fdb1 100644 --- a/tests/auto/particles/qquickage/qquickage.pro +++ b/tests/auto/particles/qquickage/qquickage.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickage SOURCES += tst_qquickage.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickage/tst_qquickage.cpp b/tests/auto/particles/qquickage/tst_qquickage.cpp index 78b8ae501d..d3562c2874 100644 --- a/tests/auto/particles/qquickage/tst_qquickage.cpp +++ b/tests/auto/particles/qquickage/tst_qquickage.cpp @@ -44,27 +44,32 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickage : public QObject +#include "../../shared/util.h" + +class tst_qquickage : public QQmlDataTest { Q_OBJECT public: - tst_qquickage(); + tst_qquickage() {} private slots: + void initTestCase(); + void test_kill(); void test_jump(); void test_onceOff(); void test_sustained(); }; -tst_qquickage::tst_qquickage() +void tst_qquickage::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickage::test_kill() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/kill.qml", 600); + QQuickView* view = createView(testFileUrl("kill.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -89,7 +94,7 @@ void tst_qquickage::test_kill() void tst_qquickage::test_jump() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/jump.qml", 600); + QQuickView* view = createView(testFileUrl("jump.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -115,7 +120,7 @@ void tst_qquickage::test_jump() void tst_qquickage::test_onceOff() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/onceoff.qml", 600); + QQuickView* view = createView(testFileUrl("onceoff.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -140,7 +145,7 @@ void tst_qquickage::test_onceOff() void tst_qquickage::test_sustained() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/sustained.qml", 600); + QQuickView* view = createView(testFileUrl("sustained.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); //TODO: Ensure some particles have lived to 0.4s point despite unified timer diff --git a/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro b/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro index ac37973695..6899ee60d9 100644 --- a/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro +++ b/tests/auto/particles/qquickangleddirection/qquickangleddirection.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickangleddirection SOURCES += tst_qquickangleddirection.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp b/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp index d916efc0de..24828d96fe 100644 --- a/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp +++ b/tests/auto/particles/qquickangleddirection/tst_qquickangleddirection.cpp @@ -45,24 +45,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickangleddirection : public QObject +#include "../../shared/util.h" + +class tst_qquickangleddirection : public QQmlDataTest { Q_OBJECT public: - tst_qquickangleddirection(); + tst_qquickangleddirection() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickangleddirection::tst_qquickangleddirection() +void tst_qquickangleddirection::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickangleddirection::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro b/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro index 42029ce721..b5d3efac6d 100644 --- a/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro +++ b/tests/auto/particles/qquickcumulativedirection/qquickcumulativedirection.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickcumulativedirection SOURCES += tst_qquickcumulativedirection.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp b/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp index aaa89ec19a..3fad1b8b09 100644 --- a/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp +++ b/tests/auto/particles/qquickcumulativedirection/tst_qquickcumulativedirection.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickcumulativedirection : public QObject +#include "../../shared/util.h" + +class tst_qquickcumulativedirection : public QQmlDataTest { Q_OBJECT public: - tst_qquickcumulativedirection(); + tst_qquickcumulativedirection() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickcumulativedirection::tst_qquickcumulativedirection() +void tst_qquickcumulativedirection::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickcumulativedirection::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro b/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro index fdc2445bd1..b1533d6be1 100644 --- a/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro +++ b/tests/auto/particles/qquickcustomaffector/qquickcustomaffector.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickcustomaffector SOURCES += tst_qquickcustomaffector.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp index c854ebe0ae..b63cde14f3 100644 --- a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp +++ b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp @@ -44,25 +44,29 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickcustomaffector : public QObject +#include "../../shared/util.h" + +class tst_qquickcustomaffector : public QQmlDataTest { Q_OBJECT public: - tst_qquickcustomaffector(); + tst_qquickcustomaffector() {} private slots: + void initTestCase(); void test_basic(); void test_move(); }; -tst_qquickcustomaffector::tst_qquickcustomaffector() +void tst_qquickcustomaffector::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickcustomaffector::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -95,7 +99,7 @@ void tst_qquickcustomaffector::test_basic() void tst_qquickcustomaffector::test_move() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/move.qml", 600); + QQuickView* view = createView(testFileUrl("move.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro b/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro index a12c1af62c..6666c91d7e 100644 --- a/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro +++ b/tests/auto/particles/qquickcustomparticle/qquickcustomparticle.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickcustomparticle SOURCES += tst_qquickcustomparticle.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp b/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp index 237fc301d9..a54e10afc6 100644 --- a/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp +++ b/tests/auto/particles/qquickcustomparticle/tst_qquickcustomparticle.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickcustomparticle : public QObject +#include "../../shared/util.h" + +class tst_qquickcustomparticle : public QQmlDataTest { Q_OBJECT public: - tst_qquickcustomparticle(); + tst_qquickcustomparticle() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickcustomparticle::tst_qquickcustomparticle() +void tst_qquickcustomparticle::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickcustomparticle::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QVERIFY(view); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro b/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro index 48d01201ce..b7eedb00f1 100644 --- a/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro +++ b/tests/auto/particles/qquickellipseextruder/qquickellipseextruder.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickellipseextruder SOURCES += tst_qquickellipseextruder.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp b/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp index 4fbc656386..2d86233924 100644 --- a/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp +++ b/tests/auto/particles/qquickellipseextruder/tst_qquickellipseextruder.cpp @@ -45,20 +45,24 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickellipseextruder : public QObject +#include "../../shared/util.h" + +class tst_qquickellipseextruder : public QQmlDataTest { Q_OBJECT public: - tst_qquickellipseextruder(); + tst_qquickellipseextruder() {} private slots: + void initTestCase(); void test_basic(); private: bool inCircle(qreal x, qreal y, qreal r, bool borderOnly=false); }; -tst_qquickellipseextruder::tst_qquickellipseextruder() +void tst_qquickellipseextruder::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } @@ -77,7 +81,7 @@ bool tst_qquickellipseextruder::inCircle(qreal x, qreal y, qreal r, bool borderO void tst_qquickellipseextruder::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickfriction/qquickfriction.pro b/tests/auto/particles/qquickfriction/qquickfriction.pro index 85b5263d36..19c789ddfe 100644 --- a/tests/auto/particles/qquickfriction/qquickfriction.pro +++ b/tests/auto/particles/qquickfriction/qquickfriction.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickfriction SOURCES += tst_qquickfriction.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp b/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp index 210e7d78c1..c3559fa2d0 100644 --- a/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp +++ b/tests/auto/particles/qquickfriction/tst_qquickfriction.cpp @@ -44,25 +44,29 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickfriction : public QObject +#include "../../shared/util.h" + +class tst_qquickfriction : public QQmlDataTest { Q_OBJECT public: - tst_qquickfriction(); + tst_qquickfriction() {} private slots: + void initTestCase(); void test_basic(); void test_threshold(); }; -tst_qquickfriction::tst_qquickfriction() +void tst_qquickfriction::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickfriction::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -106,7 +110,7 @@ void tst_qquickfriction::test_basic() void tst_qquickfriction::test_threshold() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/threshold.qml", 600); + QQuickView* view = createView(testFileUrl("threshold.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickgravity/qquickgravity.pro b/tests/auto/particles/qquickgravity/qquickgravity.pro index 5340b32cab..a3fab3837c 100644 --- a/tests/auto/particles/qquickgravity/qquickgravity.pro +++ b/tests/auto/particles/qquickgravity/qquickgravity.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickgravity SOURCES += tst_qquickgravity.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp b/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp index 2f6df5f8e6..04998d3db1 100644 --- a/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp +++ b/tests/auto/particles/qquickgravity/tst_qquickgravity.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickgravity : public QObject +#include "../../shared/util.h" + +class tst_qquickgravity : public QQmlDataTest { Q_OBJECT public: - tst_qquickgravity(); + tst_qquickgravity() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickgravity::tst_qquickgravity() +void tst_qquickgravity::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickgravity::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro b/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro index 623993c2de..b97549eeee 100644 --- a/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro +++ b/tests/auto/particles/qquickgroupgoal/qquickgroupgoal.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickgroupgoal SOURCES += tst_qquickgroupgoal.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private opengl-private testlib diff --git a/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp b/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp index c1cb8bcd4e..97c095ed9c 100644 --- a/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp +++ b/tests/auto/particles/qquickgroupgoal/tst_qquickgroupgoal.cpp @@ -44,25 +44,29 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickgroupgoal : public QObject +#include "../../shared/util.h" + +class tst_qquickgroupgoal : public QQmlDataTest { Q_OBJECT public: - tst_qquickgroupgoal(); + tst_qquickgroupgoal() {} private slots: + void initTestCase(); void test_instantTransition(); }; -tst_qquickgroupgoal::tst_qquickgroupgoal() +void tst_qquickgroupgoal::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickgroupgoal::test_instantTransition() { //Note: Does not go through sprite engine - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro b/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro index 1241467ba1..590f698510 100644 --- a/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro +++ b/tests/auto/particles/qquickimageparticle/qquickimageparticle.pro @@ -3,8 +3,7 @@ TARGET = tst_qquickimageparticle SOURCES += tst_qquickimageparticle.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp b/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp index 4d8a2e9e38..b953859d8d 100644 --- a/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp +++ b/tests/auto/particles/qquickimageparticle/tst_qquickimageparticle.cpp @@ -44,16 +44,19 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> +#include "../../shared/util.h" + const double CONV_FACTOR = 0.017453292519943295;//Degrees to radians -class tst_qquickimageparticle : public QObject +class tst_qquickimageparticle : public QQmlDataTest { Q_OBJECT public: - tst_qquickimageparticle(); + tst_qquickimageparticle() {} ~tst_qquickimageparticle(); private slots: + void initTestCase(); void test_basic(); void test_colored(); void test_colorVariance(); @@ -62,8 +65,9 @@ private slots: void test_sprite(); }; -tst_qquickimageparticle::tst_qquickimageparticle() +void tst_qquickimageparticle::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); setenv("QML_PARTICLES_DEBUG","please",0);//QQuickImageParticle has several debug statements, with possible pointer dereferences } @@ -75,7 +79,7 @@ tst_qquickimageparticle::~tst_qquickimageparticle() void tst_qquickimageparticle::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -119,7 +123,7 @@ void tst_qquickimageparticle::test_basic() void tst_qquickimageparticle::test_colored() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/colored.qml", 600); + QQuickView* view = createView(testFileUrl("colored.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -163,7 +167,7 @@ void tst_qquickimageparticle::test_colored() void tst_qquickimageparticle::test_colorVariance() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/colorVariance.qml", 600); + QQuickView* view = createView(testFileUrl("colorVariance.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -208,7 +212,7 @@ void tst_qquickimageparticle::test_colorVariance() void tst_qquickimageparticle::test_deformed() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/deformed.qml", 600); + QQuickView* view = createView(testFileUrl("deformed.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -252,7 +256,7 @@ void tst_qquickimageparticle::test_deformed() void tst_qquickimageparticle::test_tabled() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/tabled.qml", 600); + QQuickView* view = createView(testFileUrl("tabled.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); @@ -297,7 +301,7 @@ void tst_qquickimageparticle::test_tabled() void tst_qquickimageparticle::test_sprite() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/sprite.qml", 600); + QQuickView* view = createView(testFileUrl("sprite.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro b/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro index 262ebdd5b2..b275e4bf08 100644 --- a/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro +++ b/tests/auto/particles/qquickitemparticle/qquickitemparticle.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickitemparticle SOURCES += tst_qquickitemparticle.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp b/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp index a447a58b4b..629287ae83 100644 --- a/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp +++ b/tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp @@ -45,24 +45,28 @@ #include <private/qquickimage_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickitemparticle : public QObject +#include "../../shared/util.h" + +class tst_qquickitemparticle : public QQmlDataTest { Q_OBJECT public: - tst_qquickitemparticle(); + tst_qquickitemparticle() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickitemparticle::tst_qquickitemparticle() +void tst_qquickitemparticle::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickitemparticle::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro b/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro index 3b87f00320..519b3e4927 100644 --- a/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro +++ b/tests/auto/particles/qquicklineextruder/qquicklineextruder.pro @@ -3,9 +3,8 @@ TARGET = tst_qquicklineextruder SOURCES += tst_qquicklineextruder.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp b/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp index eac0a6b3c8..d760bc5062 100644 --- a/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp +++ b/tests/auto/particles/qquicklineextruder/tst_qquicklineextruder.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquicklineextruder : public QObject +#include "../../shared/util.h" + +class tst_qquicklineextruder : public QQmlDataTest { Q_OBJECT public: - tst_qquicklineextruder(); + tst_qquicklineextruder() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquicklineextruder::tst_qquicklineextruder() +void tst_qquicklineextruder::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquicklineextruder::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro b/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro index 33d6f2e41e..48aeaddc5e 100644 --- a/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro +++ b/tests/auto/particles/qquickmaskextruder/qquickmaskextruder.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickmaskextruder SOURCES += tst_qquickmaskextruder.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp b/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp index 1ccf93e5a3..7feb6e2be1 100644 --- a/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp +++ b/tests/auto/particles/qquickmaskextruder/tst_qquickmaskextruder.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickmaskextruder : public QObject +#include "../../shared/util.h" + +class tst_qquickmaskextruder : public QQmlDataTest { Q_OBJECT public: - tst_qquickmaskextruder(); + tst_qquickmaskextruder() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickmaskextruder::tst_qquickmaskextruder() +void tst_qquickmaskextruder::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickmaskextruder::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro b/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro index 594b704bd5..d3e132fc83 100644 --- a/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro +++ b/tests/auto/particles/qquickparticlegroup/qquickparticlegroup.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickparticlegroup SOURCES += tst_qquickparticlegroup.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp b/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp index 584ef80347..ff0887647c 100644 --- a/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp +++ b/tests/auto/particles/qquickparticlegroup/tst_qquickparticlegroup.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickparticlegroup : public QObject +#include "../../shared/util.h" + +class tst_qquickparticlegroup : public QQmlDataTest { Q_OBJECT public: - tst_qquickparticlegroup(); + tst_qquickparticlegroup() {} private slots: + void initTestCase(); void test_instantTransition(); }; -tst_qquickparticlegroup::tst_qquickparticlegroup() +void tst_qquickparticlegroup::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickparticlegroup::test_instantTransition() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro b/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro index ea5642aaa9..b241048d9e 100644 --- a/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro +++ b/tests/auto/particles/qquickparticlesystem/qquickparticlesystem.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickparticlesystem SOURCES += tst_qquickparticlesystem.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp b/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp index f4327ad4bb..45e9ced887 100644 --- a/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp +++ b/tests/auto/particles/qquickparticlesystem/tst_qquickparticlesystem.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickparticlesystem : public QObject +#include "../../shared/util.h" + +class tst_qquickparticlesystem : public QQmlDataTest { Q_OBJECT public: - tst_qquickparticlesystem(); + tst_qquickparticlesystem() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickparticlesystem::tst_qquickparticlesystem() +void tst_qquickparticlesystem::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickparticlesystem::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro b/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro index 4a93555f5c..22a9ac5d87 100644 --- a/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro +++ b/tests/auto/particles/qquickpointattractor/qquickpointattractor.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickpointattractor SOURCES += tst_qquickpointattractor.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp b/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp index bc81fef77d..d2ef298a55 100644 --- a/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp +++ b/tests/auto/particles/qquickpointattractor/tst_qquickpointattractor.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickpointattractor : public QObject +#include "../../shared/util.h" + +class tst_qquickpointattractor : public QQmlDataTest { Q_OBJECT public: - tst_qquickpointattractor(); + tst_qquickpointattractor() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickpointattractor::tst_qquickpointattractor() +void tst_qquickpointattractor::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickpointattractor::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro b/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro index 093e7a743f..319bdee22f 100644 --- a/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro +++ b/tests/auto/particles/qquickpointdirection/qquickpointdirection.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickpointdirection SOURCES += tst_qquickpointdirection.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp b/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp index b10529841a..885cd79b88 100644 --- a/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp +++ b/tests/auto/particles/qquickpointdirection/tst_qquickpointdirection.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickpointdirection : public QObject +#include "../../shared/util.h" + +class tst_qquickpointdirection : public QQmlDataTest { Q_OBJECT public: - tst_qquickpointdirection(); + tst_qquickpointdirection() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickpointdirection::tst_qquickpointdirection() +void tst_qquickpointdirection::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickpointdirection::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro b/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro index 1b5da6165c..683f77ec55 100644 --- a/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro +++ b/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickrectangleextruder SOURCES += tst_qquickrectangleextruder.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp index a13fe230d2..570e23ab2d 100644 --- a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp +++ b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickrectangleextruder : public QObject +#include "../../shared/util.h" + +class tst_qquickrectangleextruder : public QQmlDataTest { Q_OBJECT public: - tst_qquickrectangleextruder(); + tst_qquickrectangleextruder() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickrectangleextruder::tst_qquickrectangleextruder() +void tst_qquickrectangleextruder::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickrectangleextruder::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro b/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro index 9908f220d2..95cf68f459 100644 --- a/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro +++ b/tests/auto/particles/qquickspritegoal/qquickspritegoal.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickspritegoal SOURCES += tst_qquickspritegoal.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private opengl-private testlib diff --git a/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp b/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp index f4991470c9..704651ab17 100644 --- a/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp +++ b/tests/auto/particles/qquickspritegoal/tst_qquickspritegoal.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickspritegoal : public QObject +#include "../../shared/util.h" + +class tst_qquickspritegoal : public QQmlDataTest { Q_OBJECT public: - tst_qquickspritegoal(); + tst_qquickspritegoal() {} private slots: + void initTestCase(); void test_instantTransition(); }; -tst_qquickspritegoal::tst_qquickspritegoal() +void tst_qquickspritegoal::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickspritegoal::test_instantTransition() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro b/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro index 226cd9d139..a4a09ae6de 100644 --- a/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro +++ b/tests/auto/particles/qquicktargetdirection/qquicktargetdirection.pro @@ -3,9 +3,8 @@ TARGET = tst_qquicktargetdirection SOURCES += tst_qquicktargetdirection.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp b/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp index 666bed8e17..2362be96ca 100644 --- a/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp +++ b/tests/auto/particles/qquicktargetdirection/tst_qquicktargetdirection.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquicktargetdirection : public QObject +#include "../../shared/util.h" + +class tst_qquicktargetdirection : public QQmlDataTest { Q_OBJECT public: - tst_qquicktargetdirection(); + tst_qquicktargetdirection() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquicktargetdirection::tst_qquicktargetdirection() +void tst_qquicktargetdirection::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquicktargetdirection::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro b/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro index 67b14c86c3..e169ccdfe2 100644 --- a/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro +++ b/tests/auto/particles/qquicktrailemitter/qquicktrailemitter.pro @@ -3,9 +3,8 @@ TARGET = tst_qquicktrailemitter SOURCES += tst_qquicktrailemitter.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp b/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp index 1759c9700c..da4235f151 100644 --- a/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp +++ b/tests/auto/particles/qquicktrailemitter/tst_qquicktrailemitter.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquicktrailemitter : public QObject +#include "../../shared/util.h" + +class tst_qquicktrailemitter : public QQmlDataTest { Q_OBJECT public: - tst_qquicktrailemitter(); + tst_qquicktrailemitter() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquicktrailemitter::tst_qquicktrailemitter() +void tst_qquicktrailemitter::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquicktrailemitter::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickturbulence/qquickturbulence.pro b/tests/auto/particles/qquickturbulence/qquickturbulence.pro index d8de625b9c..306d58d223 100644 --- a/tests/auto/particles/qquickturbulence/qquickturbulence.pro +++ b/tests/auto/particles/qquickturbulence/qquickturbulence.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickturbulence SOURCES += tst_qquickturbulence.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp b/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp index 5ea982126e..985003cee0 100644 --- a/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp +++ b/tests/auto/particles/qquickturbulence/tst_qquickturbulence.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickturbulence : public QObject +#include "../../shared/util.h" + +class tst_qquickturbulence : public QQmlDataTest { Q_OBJECT public: - tst_qquickturbulence(); + tst_qquickturbulence() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickturbulence::tst_qquickturbulence() +void tst_qquickturbulence::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickturbulence::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/qquickwander/qquickwander.pro b/tests/auto/particles/qquickwander/qquickwander.pro index ceb1d9f2c2..94b88379f0 100644 --- a/tests/auto/particles/qquickwander/qquickwander.pro +++ b/tests/auto/particles/qquickwander/qquickwander.pro @@ -3,9 +3,8 @@ TARGET = tst_qquickwander SOURCES += tst_qquickwander.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +include (../../shared/util.pri) +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/particles/qquickwander/tst_qquickwander.cpp b/tests/auto/particles/qquickwander/tst_qquickwander.cpp index 9b04a0c237..12aae95a90 100644 --- a/tests/auto/particles/qquickwander/tst_qquickwander.cpp +++ b/tests/auto/particles/qquickwander/tst_qquickwander.cpp @@ -44,24 +44,28 @@ #include <private/qquickparticlesystem_p.h> #include <private/qabstractanimation_p.h> -class tst_qquickwander : public QObject +#include "../../shared/util.h" + +class tst_qquickwander : public QQmlDataTest { Q_OBJECT public: - tst_qquickwander(); + tst_qquickwander() {} private slots: + void initTestCase(); void test_basic(); }; -tst_qquickwander::tst_qquickwander() +void tst_qquickwander::initTestCase() { + QQmlDataTest::initTestCase(); QUnifiedTimer::instance()->setConsistentTiming(true); } void tst_qquickwander::test_basic() { - QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600); + QQuickView* view = createView(testFileUrl("basic.qml"), 600); QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system"); ensureAnimTime(600, system->m_animation); diff --git a/tests/auto/particles/shared/particlestestsshared.h b/tests/auto/particles/shared/particlestestsshared.h index 114ade7561..d1d1813d94 100644 --- a/tests/auto/particles/shared/particlestestsshared.h +++ b/tests/auto/particles/shared/particlestestsshared.h @@ -66,11 +66,11 @@ bool myFuzzyGEQ(qreal a, qreal b) return (a + EPSILON > b); } -QQuickView* createView(const QString &filename, int additionalWait=0) +QQuickView* createView(const QUrl &filename, int additionalWait=0) { QQuickView *canvas = new QQuickView(0); - canvas->setSource(QUrl::fromLocalFile(filename)); + canvas->setSource(filename); if (canvas->status() != QQuickView::Ready) return 0; canvas->show(); diff --git a/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro b/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro index afda4b23bd..d62a262d2f 100644 --- a/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro +++ b/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro @@ -12,9 +12,7 @@ INCLUDEPATH += ../shared include(../../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp index 2891076af6..b18f30ffb3 100644 --- a/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp +++ b/tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp @@ -71,7 +71,7 @@ private slots: void tst_QQmlDebugClient::initTestCase() { - const QString waitingMsg = QString("QQmlDebugServer: Waiting for connection on port %1...").arg(PORT); + const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT); QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); new QQmlEngine(this); @@ -80,7 +80,7 @@ void tst_QQmlDebugClient::initTestCase() QQmlDebugTestClient client("tst_QQmlDebugClient::handshake()", m_conn); QQmlDebugTestService service("tst_QQmlDebugClient::handshake()"); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); for (int i = 0; i < 50; ++i) { // try for 5 seconds ... m_conn->connectToHost("127.0.0.1", PORT); @@ -150,7 +150,7 @@ void tst_QQmlDebugClient::parallelConnect() { QQmlDebugConnection connection2; - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Another client is already connected"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Another client is already connected."); // will connect & immediately disconnect connection2.connectToHost("127.0.0.1", PORT); QVERIFY(connection2.waitForConnected()); @@ -172,7 +172,7 @@ void tst_QQmlDebugClient::sequentialConnect() QTest::qWait(100); connection2.connectToHost("127.0.0.1", PORT); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); QVERIFY(connection2.waitForConnected()); QVERIFY(connection2.isConnected()); QTRY_VERIFY(client2.state() == QQmlDebugClient::Enabled); diff --git a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro index 72b0e77f71..7bb5161ed6 100644 --- a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro +++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs.pro @@ -11,9 +11,7 @@ INCLUDEPATH += ../shared include (../../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp index 5af38c2af0..3699530e00 100644 --- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp +++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp @@ -76,14 +76,14 @@ private slots: void tst_QQmlDebugService::initTestCase() { - const QString waitingMsg = QString("QQmlDebugServer: Waiting for connection on port %1...").arg(PORT); + const QString waitingMsg = QString("QML Debugger: Waiting for connection on port %1...").arg(PORT); QTest::ignoreMessage(QtWarningMsg, waitingMsg.toAscii().constData()); new QQmlEngine(this); m_conn = new QQmlDebugConnection(this); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); for (int i = 0; i < 50; ++i) { // try for 5 seconds ... m_conn->connectToHost("127.0.0.1", PORT); diff --git a/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp b/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp index 21ed2f40ff..df8109abfb 100644 --- a/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebug/tst_qqmlenginedebug.cpp @@ -301,7 +301,7 @@ void tst_QQmlEngineDebug::initTestCase() qRegisterMetaType<QQmlDebugWatch::State>(); qmlRegisterType<NonScriptProperty>("Test", 1, 0, "NonScriptPropertyElement"); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Waiting for connection on port 3768..."); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Waiting for connection on port 3768..."); m_engine = new QQmlEngine(this); QList<QByteArray> qml; @@ -386,7 +386,7 @@ void tst_QQmlEngineDebug::initTestCase() m_conn = new QQmlDebugConnection(this); m_conn->connectToHost("127.0.0.1", 3768); - QTest::ignoreMessage(QtWarningMsg, "QQmlDebugServer: Connection established"); + QTest::ignoreMessage(QtWarningMsg, "QML Debugger: Connection established."); bool ok = m_conn->waitForConnected(); QVERIFY(ok); QTRY_VERIFY(QQmlDebugService::hasDebuggingClient()); diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp index 4f74a036d6..def704060c 100644 --- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp +++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp @@ -59,7 +59,7 @@ class QQmlInspectorClient : public QQmlDebugClient public: QQmlInspectorClient(QQmlDebugConnection *connection) - : QQmlDebugClient(QLatin1String("QQmlObserverMode"), connection) + : QQmlDebugClient(QLatin1String("QDeclarativeObserverMode"), connection) , m_showAppOnTop(false) { } diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp index 8ed64d3a5d..a3d3dce644 100644 --- a/tests/auto/qml/debugger/shared/debugutil.cpp +++ b/tests/auto/qml/debugger/shared/debugutil.cpp @@ -173,15 +173,15 @@ void QQmlDebugProcess::processAppOutput() const QString line = m_outputBuffer.left(nlIndex); m_outputBuffer = m_outputBuffer.right(m_outputBuffer.size() - nlIndex - 1); - if (line.startsWith("Qml debugging is enabled")) // ignore + if (line.startsWith("QML debugging is enabled")) // ignore continue; - if (line.startsWith("QQmlDebugServer:")) { + if (line.startsWith("QML Debugger:")) { if (line.contains("Waiting for connection ")) { m_started = true; m_eventLoop.quit(); continue; } - if (line.contains("Connection established")) { + if (line.contains("Connection established.")) { continue; } } diff --git a/tests/auto/qml/parserstress/parserstress.pro b/tests/auto/qml/parserstress/parserstress.pro index 3cf3e02e4e..6885de3065 100644 --- a/tests/auto/qml/parserstress/parserstress.pro +++ b/tests/auto/qml/parserstress/parserstress.pro @@ -4,8 +4,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_parserstress.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" -DEFINES += TESTDATADIR=\\\"$$PWD/tests\\\" +TESTDATA = tests/* CONFIG += parallel_test diff --git a/tests/auto/qml/parserstress/tst_parserstress.cpp b/tests/auto/qml/parserstress/tst_parserstress.cpp index c7f4840a11..a179a24f5f 100644 --- a/tests/auto/qml/parserstress/tst_parserstress.cpp +++ b/tests/auto/qml/parserstress/tst_parserstress.cpp @@ -86,15 +86,16 @@ QStringList tst_parserstress::findJSFiles(const QDir &d) void tst_parserstress::ecmascript_data() { -#ifdef TESTDATADIR - QDir dir(TESTDATADIR); + QString testDataDir = QFileInfo(QFINDTESTDATA("tests/shell.js")).absolutePath(); + QVERIFY2(!testDataDir.isEmpty(), qPrintable("Cannot find testDataDir!")); + + QDir dir(testDataDir); QStringList files = findJSFiles(dir); QTest::addColumn<QString>("file"); foreach (const QString &file, files) { QTest::newRow(qPrintable(file)) << file; } -#endif } void tst_parserstress::ecmascript() @@ -126,8 +127,9 @@ void tst_parserstress::ecmascript() QByteArray qmlData = qml.toUtf8(); QQmlComponent component(&engine); - - component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml"))); + + QString dummyFile = QFINDTESTDATA("dummy.qml"); + component.setData(qmlData, QUrl::fromLocalFile(dummyFile)); QFileInfo info(file); diff --git a/tests/auto/qml/qjsengine/qjsengine.pro b/tests/auto/qml/qjsengine/qjsengine.pro index 3451157dbb..6c0f91eda5 100644 --- a/tests/auto/qml/qjsengine/qjsengine.pro +++ b/tests/auto/qml/qjsengine/qjsengine.pro @@ -3,11 +3,5 @@ TARGET = tst_qjsengine QT += qml widgets testlib macx:CONFIG -= app_bundle SOURCES += tst_qjsengine.cpp -wince* { - addFiles.files = script - addFiles.path = . - DEPLOYMENT += addFiles - DEFINES += SRCDIR=\\\"./\\\" -} else { - DEFINES += SRCDIR=\\\"$$PWD\\\" -} + +TESTDATA = script/* diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index d58a29066d..4d1644f6b3 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -12,7 +12,6 @@ PUBLICTESTS += \ qmlplugindump \ qqmlcomponent \ qqmlconsole \ - qqmlcontext \ qqmlengine \ qqmlerror \ qqmlincubator \ @@ -31,6 +30,7 @@ PRIVATETESTS += \ animation \ qqmlcpputils \ qqmlecmascript \ + qqmlcontext \ qqmlexpression \ qqmlinstruction \ qqmllanguage \ diff --git a/tests/auto/qml/qmlmin/qmlmin.pro b/tests/auto/qml/qmlmin/qmlmin.pro index 49a4e7ff58..fc0ce12266 100644 --- a/tests/auto/qml/qmlmin/qmlmin.pro +++ b/tests/auto/qml/qmlmin/qmlmin.pro @@ -7,3 +7,5 @@ SOURCES += tst_qmlmin.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test + +cross_compile: DEFINES += QTEST_CROSS_COMPILED diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp index dfc88fb78c..3be7919404 100644 --- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp +++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp @@ -175,6 +175,10 @@ void tst_qmlmin::qmlMinify() { QFETCH(QString, file); +#if defined(QTEST_CROSS_COMPILED) + QSKIP("sources not available when cross compiled"); +#endif + QProcess qmlminify; qmlminify.start(qmlminPath, QStringList() << QLatin1String("--verify-only") << file); qmlminify.waitForFinished(); diff --git a/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro b/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro index 7cef181a4a..cf1c398ce5 100644 --- a/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro +++ b/tests/auto/qml/qqmlcomponent/qqmlcomponent.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmlcomponent.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlconsole/qqmlconsole.pro b/tests/auto/qml/qqmlconsole/qqmlconsole.pro index 9ae23316a1..8e76f534e0 100644 --- a/tests/auto/qml/qqmlconsole/qqmlconsole.pro +++ b/tests/auto/qml/qqmlconsole/qqmlconsole.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlcontext/qqmlcontext.pro b/tests/auto/qml/qqmlcontext/qqmlcontext.pro index 9920766d61..aaae3b8c33 100644 --- a/tests/auto/qml/qqmlcontext/qqmlcontext.pro +++ b/tests/auto/qml/qqmlcontext/qqmlcontext.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlecmascript/data/realTypePrecision.qml b/tests/auto/qml/qqmlecmascript/data/realTypePrecision.qml new file mode 100644 index 0000000000..524478887e --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/realTypePrecision.qml @@ -0,0 +1,22 @@ +import Qt.test 1.0 +import QtQuick 2.0 + +QtObject { + property real test: 1234567890 + property real test2 + property real test3 + property real test4: test3 + property real test5: func() + property real test6: test2 + test3 + + signal sig(real arg) + + Component.onCompleted: { + test2 = 1234567890; + sig(1234567890) + } + + onSig: { test3 = arg; } + + function func() { return 1234567890; } +} diff --git a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro index b07e4393a9..553dc4339f 100644 --- a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro +++ b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro @@ -14,9 +14,7 @@ include (../../shared/util.pri) # QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage # LIBS += -lgcov -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private network widgets testlib diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 45406390de..f8b268199d 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -237,6 +237,7 @@ private slots: void revisionErrors(); void revision(); void invokableWithQObjectDerived(); + void realTypePrecision(); void automaticSemicolon(); void unaryExpression(); @@ -6120,6 +6121,20 @@ void tst_qqmlecmascript::invokableWithQObjectDerived() } } +void tst_qqmlecmascript::realTypePrecision() +{ + // Properties and signal parameters of type real should have double precision. + QQmlComponent component(&engine, testFileUrl("realTypePrecision.qml")); + QScopedPointer<QObject> object(component.create()); + QVERIFY(object != 0); + QCOMPARE(object->property("test").toDouble(), 1234567890.); + QCOMPARE(object->property("test2").toDouble(), 1234567890.); + QCOMPARE(object->property("test3").toDouble(), 1234567890.); + QCOMPARE(object->property("test4").toDouble(), 1234567890.); + QCOMPARE(object->property("test5").toDouble(), 1234567890.); + QCOMPARE(object->property("test6").toDouble(), 1234567890.*2); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" diff --git a/tests/auto/qml/qqmlerror/qqmlerror.pro b/tests/auto/qml/qqmlerror/qqmlerror.pro index be2b9ab24f..918aa85961 100644 --- a/tests/auto/qml/qqmlerror/qqmlerror.pro +++ b/tests/auto/qml/qqmlerror/qqmlerror.pro @@ -8,8 +8,6 @@ macx:CONFIG -= app_bundle CONFIG += parallel_test -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private qml-private testlib diff --git a/tests/auto/qml/qqmlexpression/qqmlexpression.pro b/tests/auto/qml/qqmlexpression/qqmlexpression.pro index c2c1aa86e3..0c529ed530 100644 --- a/tests/auto/qml/qqmlexpression/qqmlexpression.pro +++ b/tests/auto/qml/qqmlexpression/qqmlexpression.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmlexpression.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlincubator/qqmlincubator.pro b/tests/auto/qml/qqmlincubator/qqmlincubator.pro index 956d72402c..b6ce22d4cf 100644 --- a/tests/auto/qml/qqmlincubator/qqmlincubator.pro +++ b/tests/auto/qml/qqmlincubator/qqmlincubator.pro @@ -9,9 +9,7 @@ HEADERS += testtypes.h include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlinfo/qqmlinfo.pro b/tests/auto/qml/qqmlinfo/qqmlinfo.pro index 21dc2c76a6..050bad68a1 100644 --- a/tests/auto/qml/qqmlinfo/qqmlinfo.pro +++ b/tests/auto/qml/qqmlinfo/qqmlinfo.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmlinfo.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private qml-private widgets testlib diff --git a/tests/auto/qml/qqmllanguage/qqmllanguage.pro b/tests/auto/qml/qqmllanguage/qqmllanguage.pro index 41b1d11764..3d5b6a56ec 100644 --- a/tests/auto/qml/qqmllanguage/qqmllanguage.pro +++ b/tests/auto/qml/qqmllanguage/qqmllanguage.pro @@ -10,9 +10,7 @@ INCLUDEPATH += ../../shared/ HEADERS += ../../shared/testhttpserver.h SOURCES += ../../shared/testhttpserver.cpp -importFiles.files = data -importFiles.path = . -DEPLOYMENT += importFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private network testlib diff --git a/tests/auto/qml/qqmllistreference/qqmllistreference.pro b/tests/auto/qml/qqmllistreference/qqmllistreference.pro index baca1e7c71..3ace6cfd10 100644 --- a/tests/auto/qml/qqmllistreference/qqmllistreference.pro +++ b/tests/auto/qml/qqmllistreference/qqmllistreference.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmllistreference.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmllocale/qqmllocale.pro b/tests/auto/qml/qqmllocale/qqmllocale.pro index 1773f83f91..c796b1cd15 100644 --- a/tests/auto/qml/qqmllocale/qqmllocale.pro +++ b/tests/auto/qml/qqmllocale/qqmllocale.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmllocale.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlmetaobject/data/property.double.qml b/tests/auto/qml/qqmlmetaobject/data/property.double.qml new file mode 100644 index 0000000000..65da1889e4 --- /dev/null +++ b/tests/auto/qml/qqmlmetaobject/data/property.double.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + property double test: 1234567890 +} diff --git a/tests/auto/qml/qqmlmetaobject/data/property.real.qml b/tests/auto/qml/qqmlmetaobject/data/property.real.qml index de2baf5be2..2268aac8c2 100644 --- a/tests/auto/qml/qqmlmetaobject/data/property.real.qml +++ b/tests/auto/qml/qqmlmetaobject/data/property.real.qml @@ -1,5 +1,5 @@ import QtQuick 2.0 QtObject { - property real test: 21 + property real test: 1234567890 } diff --git a/tests/auto/qml/qqmlmetaobject/data/signal.6.qml b/tests/auto/qml/qqmlmetaobject/data/signal.6.qml new file mode 100644 index 0000000000..a4ec6c0eaa --- /dev/null +++ b/tests/auto/qml/qqmlmetaobject/data/signal.6.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +QtObject { + signal testSignal(double foo) +} diff --git a/tests/auto/qml/qqmlmetaobject/qqmlmetaobject.pro b/tests/auto/qml/qqmlmetaobject/qqmlmetaobject.pro index b87a7cd8bd..53744d16f3 100644 --- a/tests/auto/qml/qqmlmetaobject/qqmlmetaobject.pro +++ b/tests/auto/qml/qqmlmetaobject/qqmlmetaobject.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmlmetaobject.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += qml testlib diff --git a/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp b/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp index 6cadc3524b..f2c50ddbef 100644 --- a/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp +++ b/tests/auto/qml/qqmlmetaobject/tst_qqmlmetaobject.cpp @@ -92,12 +92,18 @@ void tst_QQmlMetaObject::property_data() << QByteArray("bool") << int(QMetaType::Bool) << true // default << QVariant(true) << true << QVariant(false); + QTest::newRow("double") << "property.double.qml" + << QByteArray("double") << int(QMetaType::Double) + << false // default + << QVariant(double(1234567890.)) + << true // writable + << QVariant(double(1.23456789)); QTest::newRow("real") << "property.real.qml" << QByteArray("double") << int(QMetaType::Double) << false // default - << QVariant(double(21)) + << QVariant(double(1234567890.)) << true // writable - << QVariant(double(37)); + << QVariant(double(1.23456789)); QTest::newRow("string") << "property.string.qml" << QByteArray("QString") << int(QMetaType::QString) << true // default @@ -306,10 +312,10 @@ void tst_QQmlMetaObject::method_data() << (QList<QByteArray>() << "QString") << (QList<QByteArray>() << "foo"); QTest::newRow("testSignal(int foo, bool bar, real baz)") << "signal.3.qml" - << "testSignal(int,bool,qreal)" + << "testSignal(int,bool,double)" << QMetaMethod::Signal << "" - << (QList<QByteArray>() << "int" << "bool" << "qreal") + << (QList<QByteArray>() << "int" << "bool" << "double") << (QList<QByteArray>() << "foo" << "bar" << "baz"); QTest::newRow("testSignal(variant foo, var bar)") << "signal.4.qml" << "testSignal(QVariant,QVariant)" @@ -323,6 +329,12 @@ void tst_QQmlMetaObject::method_data() << "" << (QList<QByteArray>() << "QColor" << "QDateTime" << "QUrl") << (QList<QByteArray>() << "foo" << "bar" << "baz"); + QTest::newRow("testSignal(double foo)") << "signal.6.qml" + << "testSignal(double)" + << QMetaMethod::Signal + << "" + << (QList<QByteArray>() << "double") + << (QList<QByteArray>() << "foo"); } void tst_QQmlMetaObject::method() diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro index 3d5fe7d6ae..927d802898 100644 --- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro +++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.pro @@ -8,12 +8,6 @@ CONFIG -= app_bundle include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles - -testImportFiles.files = imports -testImportFiles.path = . -DEPLOYMENT += testImportFiles +TESTDATA = data/* imports/* QT += core-private gui-private qml-private network testlib diff --git a/tests/auto/qml/qqmlparser/qqmlparser.pro b/tests/auto/qml/qqmlparser/qqmlparser.pro index e1b7b39402..10e033af90 100644 --- a/tests/auto/qml/qqmlparser/qqmlparser.pro +++ b/tests/auto/qml/qqmlparser/qqmlparser.pro @@ -7,3 +7,5 @@ SOURCES += tst_qqmlparser.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test + +cross_compile: DEFINES += QTEST_CROSS_COMPILED diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index 5fb5b71533..00b64e04a1 100644 --- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -182,6 +182,10 @@ void tst_qqmlparser::qmlParser() { QFETCH(QString, file); +#if defined(QTEST_CROSS_COMPILED) + QSKIP("sources not available when cross compiled"); +#endif + using namespace QQmlJS; QString code; diff --git a/tests/auto/qml/qqmlproperty/qqmlproperty.pro b/tests/auto/qml/qqmlproperty/qqmlproperty.pro index 689db4d7cf..6d878902ff 100644 --- a/tests/auto/qml/qqmlproperty/qqmlproperty.pro +++ b/tests/auto/qml/qqmlproperty/qqmlproperty.pro @@ -6,9 +6,7 @@ SOURCES += tst_qqmlproperty.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlqt/qqmlqt.pro b/tests/auto/qml/qqmlqt/qqmlqt.pro index 890a7e7636..92fabf5882 100644 --- a/tests/auto/qml/qqmlqt/qqmlqt.pro +++ b/tests/auto/qml/qqmlqt/qqmlqt.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro b/tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro index c17e16bfdd..f784877c7d 100644 --- a/tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro +++ b/tests/auto/qml/qqmlsqldatabase/qqmlsqldatabase.pro @@ -8,8 +8,6 @@ include (../../shared/util.pri) CONFIG += parallel_test -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private sql testlib diff --git a/tests/auto/qml/qqmltranslation/qqmltranslation.pro b/tests/auto/qml/qqmltranslation/qqmltranslation.pro index d3f98e181f..cad684a54e 100644 --- a/tests/auto/qml/qqmltranslation/qqmltranslation.pro +++ b/tests/auto/qml/qqmltranslation/qqmltranslation.pro @@ -7,9 +7,7 @@ RESOURCES += data/translation.qrc include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro b/tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro index 6051f65936..9155cbee96 100644 --- a/tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro +++ b/tests/auto/qml/qqmlvaluetypes/qqmlvaluetypes.pro @@ -9,9 +9,7 @@ SOURCES += tst_qqmlvaluetypes.cpp \ include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro b/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro index ed016fd9b6..8f3b2e071f 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro +++ b/tests/auto/qml/qqmlxmlhttprequest/qqmlxmlhttprequest.pro @@ -10,9 +10,7 @@ SOURCES += tst_qqmlxmlhttprequest.cpp \ include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qquickbinding/qquickbinding.pro b/tests/auto/qml/qquickbinding/qquickbinding.pro index b87e93495d..95c82ceb9d 100644 --- a/tests/auto/qml/qquickbinding/qquickbinding.pro +++ b/tests/auto/qml/qquickbinding/qquickbinding.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickbinding.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qquickconnection/qquickconnection.pro b/tests/auto/qml/qquickconnection/qquickconnection.pro index bea1f1df00..baef334459 100644 --- a/tests/auto/qml/qquickconnection/qquickconnection.pro +++ b/tests/auto/qml/qquickconnection/qquickconnection.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickconnection.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro b/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro index bdf4a45865..2726e20577 100644 --- a/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro +++ b/tests/auto/qml/qquickfolderlistmodel/qquickfolderlistmodel.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickfolderlistmodel.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private qml-private testlib diff --git a/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro b/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro index 9b96fa0659..25b28bbe4c 100644 --- a/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro +++ b/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquicklistmodel.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro b/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro index e9c358c3cc..a1b9fdd65b 100644 --- a/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro +++ b/tests/auto/qml/qquickworkerscript/qquickworkerscript.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickworkerscript.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/qml/v4/v4.pro b/tests/auto/qml/v4/v4.pro index df8e7b1c3c..97cd342019 100644 --- a/tests/auto/qml/v4/v4.pro +++ b/tests/auto/qml/v4/v4.pro @@ -8,9 +8,7 @@ HEADERS += testtypes.h include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/examples/examples.pro b/tests/auto/quick/examples/examples.pro index e67120d7c2..5907ba291c 100644 --- a/tests/auto/quick/examples/examples.pro +++ b/tests/auto/quick/examples/examples.pro @@ -8,3 +8,5 @@ DEFINES += SRCDIR=\\\"$$PWD\\\" CONFIG += parallel_test #temporary QT += core-private gui-private qml-private quick-private widgets-private v8-private testlib + +cross_compile: DEFINES += QTEST_CROSS_COMPILED diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 482053e158..c29da570c3 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -237,6 +237,10 @@ void tst_examples::sgexamples() { QFETCH(QString, file); +#if defined(QTEST_CROSS_COMPILED) + QSKIP("sources not available when cross compiled"); +#endif + QQmlComponent component(&engine, QUrl::fromLocalFile(file)); if (component.status() == QQmlComponent::Error) qWarning() << component.errors(); @@ -274,6 +278,10 @@ void tst_examples::sgsnippets() { QFETCH(QString, file); +#if defined(QTEST_CROSS_COMPILED) + QSKIP("sources not available when cross compiled"); +#endif + QQmlComponent component(&engine, QUrl::fromLocalFile(file)); if (component.status() == QQmlComponent::Error) qWarning() << component.errors(); diff --git a/tests/auto/quick/qquickaccessible/qquickaccessible.pro b/tests/auto/quick/qquickaccessible/qquickaccessible.pro index ca50f5d8af..1c811d75b7 100644 --- a/tests/auto/quick/qquickaccessible/qquickaccessible.pro +++ b/tests/auto/quick/qquickaccessible/qquickaccessible.pro @@ -8,13 +8,13 @@ SOURCES += tst_qquickaccessible.cpp include (../../shared/util.pri) +TESTDATA = data/* + OTHER_FILES += data/checkbuttons.qml OTHER_FILES += data/hittest.qml OTHER_FILES += data/pushbutton.qml OTHER_FILES += data/statictext.qml -DEFINES += SRCDIR=\\\"$$PWD\\\" - CONFIG += parallel_test wince*: { diff --git a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp index d65666162d..48c07c6e2c 100644 --- a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp +++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp @@ -129,8 +129,8 @@ void tst_QQuickAccessible::commonTests_data() { QTest::addColumn<QString>("accessibleRoleFileName"); - QTest::newRow("StaticText") << SRCDIR "/data/statictext.qml"; - QTest::newRow("PushButton") << SRCDIR "/data/pushbutton.qml"; + QTest::newRow("StaticText") << "statictext.qml"; + QTest::newRow("PushButton") << "pushbutton.qml"; } void tst_QQuickAccessible::commonTests() @@ -141,7 +141,7 @@ void tst_QQuickAccessible::commonTests() QQuickView *view = new QQuickView(); // view->setFixedSize(240,320); - view->setSource(QUrl::fromLocalFile(accessibleRoleFileName)); + view->setSource(testFileUrl(accessibleRoleFileName)); view->show(); // view->setFocus(); QVERIFY(view->rootObject() != 0); diff --git a/tests/auto/quick/qquickanchors/qquickanchors.pro b/tests/auto/quick/qquickanchors/qquickanchors.pro index 30e6e6dcf8..343f39b6f0 100644 --- a/tests/auto/quick/qquickanchors/qquickanchors.pro +++ b/tests/auto/quick/qquickanchors/qquickanchors.pro @@ -7,9 +7,7 @@ include (../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro b/tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro index 468a3253f8..e2d68f191c 100644 --- a/tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro +++ b/tests/auto/quick/qquickanimatedimage/qquickanimatedimage.pro @@ -8,9 +8,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickanimatedsprite/qquickanimatedsprite.pro b/tests/auto/quick/qquickanimatedsprite/qquickanimatedsprite.pro index 3c20ccea66..04298673b6 100644 --- a/tests/auto/quick/qquickanimatedsprite/qquickanimatedsprite.pro +++ b/tests/auto/quick/qquickanimatedsprite/qquickanimatedsprite.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro b/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro index 72a09fcb9c..c09eb5c98c 100644 --- a/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro +++ b/tests/auto/quick/qquickanimationcontroller/qquickanimationcontroller.pro @@ -5,6 +5,4 @@ TARGET=tst_qquickanimationcontroller CONFIG += warn_on qmltestcase SOURCES += tst_qquickanimationcontroller.cpp -importFiles.files = data -importFiles.path = . -DEPLOYMENT += importFiles +TESTDATA = data/* diff --git a/tests/auto/quick/qquickanimations/qquickanimations.pro b/tests/auto/quick/qquickanimations/qquickanimations.pro index 0e432ab9f1..d9c3ea28c1 100644 --- a/tests/auto/quick/qquickanimations/qquickanimations.pro +++ b/tests/auto/quick/qquickanimations/qquickanimations.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro b/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro index fc103ed4c2..dcffad6cd9 100644 --- a/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro +++ b/tests/auto/quick/qquickbehaviors/qquickbehaviors.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickborderimage/qquickborderimage.pro b/tests/auto/quick/qquickborderimage/qquickborderimage.pro index f50149aead..c967d579e5 100644 --- a/tests/auto/quick/qquickborderimage/qquickborderimage.pro +++ b/tests/auto/quick/qquickborderimage/qquickborderimage.pro @@ -8,9 +8,7 @@ SOURCES += tst_qquickborderimage.cpp \ include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickcanvas/qquickcanvas.pro b/tests/auto/quick/qquickcanvas/qquickcanvas.pro index 7f27a05243..817eb2534f 100644 --- a/tests/auto/quick/qquickcanvas/qquickcanvas.pro +++ b/tests/auto/quick/qquickcanvas/qquickcanvas.pro @@ -9,9 +9,7 @@ macx:CONFIG -= app_bundle CONFIG += parallel_test QT += core-private gui-private qml-private quick-private testlib -testData.files = data -testData.path = . -DEPLOYMENT += testData +TESTDATA = data/* OTHER_FILES += \ data/AnimationsWhileHidden.qml \ diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_arc.qml b/tests/auto/quick/qquickcanvasitem/data/tst_arc.qml index 6006a5a4c0..ffe6583d2e 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_arc.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_arc.qml @@ -3,7 +3,7 @@ import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "arc"; when: windowShown function test_angle_1() { diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml b/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml index cc1d88672b..8609ad0332 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_arcto.qml @@ -3,7 +3,7 @@ import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "arcTo"; when: windowShown function test_coincide() { diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml b/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml index a00ccc3c3f..23d7b719ff 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_canvas.qml @@ -15,6 +15,8 @@ Rectangle { context.fillStyle = "red"; context.fillRect(0, 0, 100, 100); } + renderTarget:Canvas.Image + renderStrategy:Canvas.Threaded property int paintCount:spyPaint.count property int paintedCount:spyPainted.count property int canvasSizeChangedCount:spyCanvasSizeChanged.count @@ -228,7 +230,7 @@ Rectangle { c.toDataURL(); wait(100); - compare(c.paintedCount, 1); + compare(c.paintedCount, 2); compare(c.paintCount, 1); c.destroy(); diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_composite.qml b/tests/auto/quick/qquickcanvasitem/data/tst_composite.qml index 11e1dce902..bdc9d37663 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_composite.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_composite.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget:Canvas.Image + id:canvas; width:100;height:50; renderTarget:Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "composite"; when: windowShown function test_clearRect() { @@ -377,4 +377,4 @@ Canvas { } } -}
\ No newline at end of file +} diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_drawimage.qml b/tests/auto/quick/qquickcanvasitem/data/tst_drawimage.qml index 102217dc0c..75dd2b380c 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_drawimage.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_drawimage.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded Component.onCompleted: { canvas.loadImage('green.png'); canvas.loadImage('red.png'); diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_fillStyle.qml b/tests/auto/quick/qquickcanvasitem/data/tst_fillStyle.qml index 8f5a78cec0..153a1034c1 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_fillStyle.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_fillStyle.qml @@ -3,7 +3,7 @@ import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:1;height:1;renderTarget:Canvas.Image + id:canvas; width:1;height:1;renderTarget:Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "fillStyle"; when: windowShown function test_default() { diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_gradient.qml b/tests/auto/quick/qquickcanvasitem/data/tst_gradient.qml index d454c2efe1..10ee6a6313 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_gradient.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_gradient.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "gradient"; when: windowShown function test_basic() { diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_line.qml b/tests/auto/quick/qquickcanvasitem/data/tst_line.qml index baf9987ce3..f1c2820734 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_line.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_line.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import"testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50;renderTarget: Canvas.Image + id:canvas; width:100;height:50;renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "line"; when: windowShown function test_default() { @@ -828,4 +828,4 @@ Canvas { } } -}
\ No newline at end of file +} diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_path.qml b/tests/auto/quick/qquickcanvasitem/data/tst_path.qml index b04ccf5458..6aaecbdfa5 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_path.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_path.qml @@ -3,7 +3,7 @@ import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "path"; when: windowShown diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_pattern.qml b/tests/auto/quick/qquickcanvasitem/data/tst_pattern.qml index dd5b6628e8..29c8bc97fc 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_pattern.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_pattern.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { //TODO name: "pattern"; when: windowShown diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_pixel.qml b/tests/auto/quick/qquickcanvasitem/data/tst_pixel.qml index 1a3793d7a3..8fd390a36a 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_pixel.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_pixel.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { //TODO name: "pixel"; when: windowShown diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_shadow.qml b/tests/auto/quick/qquickcanvasitem/data/tst_shadow.qml index 4405ca6c0e..bcb602a31a 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_shadow.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_shadow.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { //TODO diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_state.qml b/tests/auto/quick/qquickcanvasitem/data/tst_state.qml index 8042cf6a1d..def312d1e5 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_state.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_state.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { id:testCase name: "state"; when: windowShown diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_strokeStyle.qml b/tests/auto/quick/qquickcanvasitem/data/tst_strokeStyle.qml index 6b42f8a770..2521643837 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_strokeStyle.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_strokeStyle.qml @@ -3,7 +3,7 @@ import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget:Canvas.Image + id:canvas; width:100;height:50; renderTarget:Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "strokeStyle"; when: windowShown function test_default() { diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_text.qml b/tests/auto/quick/qquickcanvasitem/data/tst_text.qml index baeb17c9fb..11618e95a9 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_text.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_text.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { //TODO name: "text"; when: windowShown diff --git a/tests/auto/quick/qquickcanvasitem/data/tst_transform.qml b/tests/auto/quick/qquickcanvasitem/data/tst_transform.qml index 834a22f549..b8505c6452 100644 --- a/tests/auto/quick/qquickcanvasitem/data/tst_transform.qml +++ b/tests/auto/quick/qquickcanvasitem/data/tst_transform.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QtTest 1.0 import "testhelper.js" as Helper Canvas { - id:canvas; width:100;height:50; renderTarget: Canvas.Image + id:canvas; width:100;height:50; renderTarget: Canvas.Image; renderStrategy:Canvas.Threaded TestCase { name: "transform"; when: windowShown function test_order() { diff --git a/tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro b/tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro index ccf894715f..b0122f997a 100644 --- a/tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro +++ b/tests/auto/quick/qquickcanvasitem/qquickcanvasitem.pro @@ -5,9 +5,7 @@ TARGET=tst_qquickcanvasitem CONFIG += warn_on qmltestcase SOURCES += tst_qquickcanvasitem.cpp -importFiles.files = data -importFiles.path = . -DEPLOYMENT += importFiles +TESTDATA = data/* OTHER_FILES += \ data/testhelper.js \ diff --git a/tests/auto/quick/qquickflickable/qquickflickable.pro b/tests/auto/quick/qquickflickable/qquickflickable.pro index 0ca03b2497..35d9b8cbb6 100644 --- a/tests/auto/quick/qquickflickable/qquickflickable.pro +++ b/tests/auto/quick/qquickflickable/qquickflickable.pro @@ -7,9 +7,7 @@ SOURCES += tst_qquickflickable.cpp include (../../shared/util.pri) include (../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private testlib diff --git a/tests/auto/quick/qquickflipable/qquickflipable.pro b/tests/auto/quick/qquickflipable/qquickflipable.pro index ca98cbe279..1198a1f646 100644 --- a/tests/auto/quick/qquickflipable/qquickflipable.pro +++ b/tests/auto/quick/qquickflipable/qquickflipable.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickflipable.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickfocusscope/qquickfocusscope.pro b/tests/auto/quick/qquickfocusscope/qquickfocusscope.pro index 34de32b173..7a4b7302d0 100644 --- a/tests/auto/quick/qquickfocusscope/qquickfocusscope.pro +++ b/tests/auto/quick/qquickfocusscope/qquickfocusscope.pro @@ -7,8 +7,6 @@ include (../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/quick/qquickfontloader/qquickfontloader.pro b/tests/auto/quick/qquickfontloader/qquickfontloader.pro index 7c34c43d04..2eeb286e61 100644 --- a/tests/auto/quick/qquickfontloader/qquickfontloader.pro +++ b/tests/auto/quick/qquickfontloader/qquickfontloader.pro @@ -8,9 +8,7 @@ SOURCES += tst_qquickfontloader.cpp \ include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickgridview/data/displacedTransitions.qml b/tests/auto/quick/qquickgridview/data/displacedTransitions.qml index d9353c0639..2db06976fb 100644 --- a/tests/auto/quick/qquickgridview/data/displacedTransitions.qml +++ b/tests/auto/quick/qquickgridview/data/displacedTransitions.qml @@ -38,6 +38,7 @@ Rectangle { text: number } color: GridView.isCurrentItem ? "lightsteelblue" : "white" + border.width: 1 onXChanged: checkPos() onYChanged: checkPos() @@ -61,6 +62,17 @@ Rectangle { property int targetTransitionsDone property int displaceTransitionsDone + property var displacedTargetIndexes: new Array() + property var displacedTargetItems: new Array() + + // for QDeclarativeListProperty types + function copyList(propList) { + var temp = new Array() + for (var i=0; i<propList.length; i++) + temp.push(propList[i]) + return temp + } + objectName: "grid" focus: true anchors.centerIn: parent @@ -80,6 +92,12 @@ Rectangle { id: displaced enabled: displacedEnabled SequentialAnimation { + ScriptAction { + script: { + grid.displacedTargetIndexes.push(displaced.ViewTransition.targetIndexes) + grid.displacedTargetItems.push(grid.copyList(displaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: displaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: displaced_transitionVia.y; duration: root.duration } @@ -93,6 +111,12 @@ Rectangle { id: addDisplaced enabled: addDisplacedEnabled SequentialAnimation { + ScriptAction { + script: { + grid.displacedTargetIndexes.push(addDisplaced.ViewTransition.targetIndexes) + grid.displacedTargetItems.push(grid.copyList(addDisplaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: addDisplaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: addDisplaced_transitionVia.y; duration: root.duration } @@ -106,6 +130,12 @@ Rectangle { id: moveDisplaced enabled: moveDisplacedEnabled SequentialAnimation { + ScriptAction { + script: { + grid.displacedTargetIndexes.push(moveDisplaced.ViewTransition.targetIndexes) + grid.displacedTargetItems.push(grid.copyList(moveDisplaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: moveDisplaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: moveDisplaced_transitionVia.y; duration: root.duration } @@ -119,6 +149,12 @@ Rectangle { id: removeDisplaced enabled: removeDisplacedEnabled SequentialAnimation { + ScriptAction { + script: { + grid.displacedTargetIndexes.push(removeDisplaced.ViewTransition.targetIndexes) + grid.displacedTargetItems.push(grid.copyList(removeDisplaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: removeDisplaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: removeDisplaced_transitionVia.y; duration: root.duration } diff --git a/tests/auto/quick/qquickgridview/data/multipleTransitions.qml b/tests/auto/quick/qquickgridview/data/multipleTransitions.qml index 909ec3a0b7..f0d932082b 100644 --- a/tests/auto/quick/qquickgridview/data/multipleTransitions.qml +++ b/tests/auto/quick/qquickgridview/data/multipleTransitions.qml @@ -10,7 +10,7 @@ Rectangle { // interrupting transitions will still produce the correct result) property int timeBetweenActions: duration / 2 - property int duration: 300 + property int duration: 100 property int count: grid.count diff --git a/tests/auto/quick/qquickgridview/qquickgridview.pro b/tests/auto/quick/qquickgridview/qquickgridview.pro index cabf4396b4..b4a234e35a 100644 --- a/tests/auto/quick/qquickgridview/qquickgridview.pro +++ b/tests/auto/quick/qquickgridview/qquickgridview.pro @@ -7,9 +7,7 @@ SOURCES += tst_qquickgridview.cpp include (../../shared/util.pri) include (../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib widgets diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index c0f2b02a7e..66c98cda84 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -1274,8 +1274,6 @@ void tst_QQuickGridView::moved_data() void tst_QQuickGridView::multipleChanges() { - QSKIP("QTBUG-24523"); - QFETCH(int, startCount); QFETCH(QList<ListChange>, changes); QFETCH(int, newCount); @@ -1775,6 +1773,12 @@ void tst_QQuickGridView::currentIndex() QVERIFY(!gridview->highlightItem()); QVERIFY(!gridview->currentItem()); + // moving currentItem out of view should make it invisible + gridview->setCurrentIndex(0); + QTRY_VERIFY(gridview->currentItem()->isVisible()); + gridview->setContentY(200); + QTRY_VERIFY(!gridview->currentItem()->isVisible()); + delete canvas; } @@ -4639,11 +4643,26 @@ void tst_QQuickGridView::displacedTransitions() case ListChange::SetContentY: break; } + + QVariantList resultTargetIndexes = gridview->property("displacedTargetIndexes").toList(); + QVariantList resultTargetItems = gridview->property("displacedTargetItems").toList(); + if ((useDisplaced && displacedEnabled) || (useAddDisplaced && addDisplacedEnabled) || (useMoveDisplaced && moveDisplacedEnabled) || (useRemoveDisplaced && removeDisplacedEnabled)) { QTRY_VERIFY(gridview->property("displaceTransitionsDone").toBool()); + + // check the correct number of target items and indexes were received + QCOMPARE(resultTargetIndexes.count(), expectedDisplacedIndexes.count()); + for (int i=0; i<resultTargetIndexes.count(); i++) + QCOMPARE(resultTargetIndexes[i].value<QList<int> >().count(), change.count); + QCOMPARE(resultTargetItems.count(), expectedDisplacedIndexes.count()); + for (int i=0; i<resultTargetItems.count(); i++) + QCOMPARE(resultTargetItems[i].toList().count(), change.count); + } else { + QCOMPARE(resultTargetIndexes.count(), 0); + QCOMPARE(resultTargetItems.count(), 0); } if (change.type == ListChange::Inserted && useAddDisplaced && addDisplacedEnabled) @@ -4817,17 +4836,15 @@ void tst_QQuickGridView::multipleTransitions() int timeBetweenActions = canvas->rootObject()->property("timeBetweenActions").toInt(); - QList<QPair<QString, QString> > targetItems; for (int i=0; i<changes.count(); i++) { switch (changes[i].type) { case ListChange::Inserted: { + QList<QPair<QString, QString> > targetItems; for (int j=changes[i].index; j<changes[i].index + changes[i].count; ++j) targetItems << qMakePair(QString("new item %1").arg(j), QString::number(j)); model.insertItems(changes[i].index, targetItems); QTRY_COMPARE(model.count(), gridview->count()); - QTRY_VERIFY(gridview->property("runningAddTargets").toBool()); - QTRY_VERIFY(gridview->property("runningAddDisplaced").toBool()); if (i == changes.count() - 1) { QTRY_VERIFY(!gridview->property("runningAddTargets").toBool()); QTRY_VERIFY(!gridview->property("runningAddDisplaced").toBool()); @@ -4837,12 +4854,8 @@ void tst_QQuickGridView::multipleTransitions() break; } case ListChange::Removed: - for (int j=changes[i].index; j<changes[i].index + changes[i].count; ++j) - targetItems << qMakePair(model.name(i), model.number(i)); model.removeItems(changes[i].index, changes[i].count); QTRY_COMPARE(model.count(), gridview->count()); - QTRY_VERIFY(gridview->property("runningRemoveTargets").toBool()); - QTRY_VERIFY(gridview->property("runningRemoveDisplaced").toBool()); if (i == changes.count() - 1) { QTRY_VERIFY(!gridview->property("runningRemoveTargets").toBool()); QTRY_VERIFY(!gridview->property("runningRemoveDisplaced").toBool()); @@ -4851,11 +4864,8 @@ void tst_QQuickGridView::multipleTransitions() } break; case ListChange::Moved: - for (int j=changes[i].index; j<changes[i].index + changes[i].count; ++j) - targetItems << qMakePair(model.name(i), model.number(i)); model.moveItems(changes[i].index, changes[i].to, changes[i].count); - QTRY_VERIFY(gridview->property("runningMoveTargets").toBool()); - QTRY_VERIFY(gridview->property("runningMoveDisplaced").toBool()); + QTRY_COMPARE(QQuickItemPrivate::get(gridview)->polishScheduled, false); if (i == changes.count() - 1) { QTRY_VERIFY(!gridview->property("runningMoveTargets").toBool()); QTRY_VERIFY(!gridview->property("runningMoveDisplaced").toBool()); diff --git a/tests/auto/quick/qquickimage/qquickimage.pro b/tests/auto/quick/qquickimage/qquickimage.pro index a68a7870d8..ad0097df08 100644 --- a/tests/auto/quick/qquickimage/qquickimage.pro +++ b/tests/auto/quick/qquickimage/qquickimage.pro @@ -9,9 +9,7 @@ SOURCES += tst_qquickimage.cpp \ include (../../shared/util.pri) include (../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private qml-private quick-private network testlib diff --git a/tests/auto/quick/qquickitem/qquickitem.pro b/tests/auto/quick/qquickitem/qquickitem.pro index cf24e63d05..cbbd6e586b 100644 --- a/tests/auto/quick/qquickitem/qquickitem.pro +++ b/tests/auto/quick/qquickitem/qquickitem.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private widgets testlib diff --git a/tests/auto/quick/qquickitem2/qquickitem2.pro b/tests/auto/quick/qquickitem2/qquickitem2.pro index 29897ba3c1..887c8796a8 100644 --- a/tests/auto/quick/qquickitem2/qquickitem2.pro +++ b/tests/auto/quick/qquickitem2/qquickitem2.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickitem.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickitemlayer/qquickitemlayer.pro b/tests/auto/quick/qquickitemlayer/qquickitemlayer.pro index a2d5f401ff..9ffdbe7454 100644 --- a/tests/auto/quick/qquickitemlayer/qquickitemlayer.pro +++ b/tests/auto/quick/qquickitemlayer/qquickitemlayer.pro @@ -4,9 +4,7 @@ SOURCES += tst_qquickitemlayer.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* include(../../shared/util.pri) diff --git a/tests/auto/quick/qquicklistview/data/displacedTransitions.qml b/tests/auto/quick/qquicklistview/data/displacedTransitions.qml index cc7892e930..964ded10ee 100644 --- a/tests/auto/quick/qquicklistview/data/displacedTransitions.qml +++ b/tests/auto/quick/qquicklistview/data/displacedTransitions.qml @@ -53,6 +53,17 @@ Rectangle { property int targetTransitionsDone property int displaceTransitionsDone + property var displacedTargetIndexes: new Array() + property var displacedTargetItems: new Array() + + // for QDeclarativeListProperty types + function copyList(propList) { + var temp = new Array() + for (var i=0; i<propList.length; i++) + temp.push(propList[i]) + return temp + } + objectName: "list" focus: true anchors.centerIn: parent @@ -70,6 +81,12 @@ Rectangle { id: displaced enabled: displacedEnabled SequentialAnimation { + ScriptAction { + script: { + list.displacedTargetIndexes.push(displaced.ViewTransition.targetIndexes) + list.displacedTargetItems.push(list.copyList(displaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: displaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: displaced_transitionVia.y; duration: root.duration } @@ -83,6 +100,12 @@ Rectangle { id: addDisplaced enabled: addDisplacedEnabled SequentialAnimation { + ScriptAction { + script: { + list.displacedTargetIndexes.push(addDisplaced.ViewTransition.targetIndexes) + list.displacedTargetItems.push(list.copyList(addDisplaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: addDisplaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: addDisplaced_transitionVia.y; duration: root.duration } @@ -96,6 +119,12 @@ Rectangle { id: moveDisplaced enabled: moveDisplacedEnabled SequentialAnimation { + ScriptAction { + script: { + list.displacedTargetIndexes.push(moveDisplaced.ViewTransition.targetIndexes) + list.displacedTargetItems.push(list.copyList(moveDisplaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: moveDisplaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: moveDisplaced_transitionVia.y; duration: root.duration } @@ -109,6 +138,12 @@ Rectangle { id: removeDisplaced enabled: removeDisplacedEnabled SequentialAnimation { + ScriptAction { + script: { + list.displacedTargetIndexes.push(removeDisplaced.ViewTransition.targetIndexes) + list.displacedTargetItems.push(list.copyList(removeDisplaced.ViewTransition.targetItems)) + } + } ParallelAnimation { NumberAnimation { properties: "x"; to: removeDisplaced_transitionVia.x; duration: root.duration } NumberAnimation { properties: "y"; to: removeDisplaced_transitionVia.y; duration: root.duration } diff --git a/tests/auto/quick/qquicklistview/data/flickBeyondBoundsBug.qml b/tests/auto/quick/qquicklistview/data/flickBeyondBoundsBug.qml new file mode 100644 index 0000000000..0a1b1a1b64 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/flickBeyondBoundsBug.qml @@ -0,0 +1,43 @@ +import QtQuick 2.0 + +Rectangle { + id: root + width: 240 + height: 320 + color: "#ffffff" + + Component { + id: myDelegate + Rectangle { + id: wrapper + objectName: "wrapper" + height: column.height + Column { + id: column + Text { + text: "index: " + index + ", delegate A" + Component.onCompleted: height = index % 2 ? 30 : 20 + } + Text { + x: 200 + text: wrapper.y + height: 25 + } + } + color: ListView.isCurrentItem ? "lightsteelblue" : "#EEEEEE" + } + } + ListView { + id: list + objectName: "list" + focus: true + width: 240 + height: 320 + model: 2 + delegate: myDelegate + highlightMoveSpeed: 1000 + highlightResizeSpeed: 1000 + cacheBuffer: 400 + } + Text { anchors.bottom: parent.bottom; text: list.contentY } +} diff --git a/tests/auto/quick/qquicklistview/data/multipleTransitions.qml b/tests/auto/quick/qquicklistview/data/multipleTransitions.qml index 8264b42b64..68efeea2ec 100644 --- a/tests/auto/quick/qquicklistview/data/multipleTransitions.qml +++ b/tests/auto/quick/qquicklistview/data/multipleTransitions.qml @@ -10,7 +10,7 @@ Rectangle { // interrupting transitions will still produce the correct result) property int timeBetweenActions: duration / 2 - property int duration: 300 + property int duration: 100 property int count: list.count diff --git a/tests/auto/quick/qquicklistview/qquicklistview.pro b/tests/auto/quick/qquicklistview/qquicklistview.pro index 4cac8e7665..d4d97e2106 100644 --- a/tests/auto/quick/qquicklistview/qquicklistview.pro +++ b/tests/auto/quick/qquicklistview/qquicklistview.pro @@ -9,8 +9,6 @@ SOURCES += tst_qquicklistview.cpp \ include (../../shared/util.pri) include (../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private qml-private quick-private widgets widgets-private v8-private opengl-private testlib diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 9195aab632..dcc2e9dd16 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -184,6 +184,8 @@ private slots: void multipleTransitions(); void multipleTransitions_data(); + void flickBeyondBounds(); + private: template <class T> void items(const QUrl &source, bool forceLayout); template <class T> void changed(const QUrl &source, bool forceLayout); @@ -2351,6 +2353,11 @@ void tst_QQuickListView::currentIndex() QVERIFY(!listview->highlightItem()); QVERIFY(!listview->currentItem()); + listview->setCurrentIndex(0); + QTRY_VERIFY(listview->currentItem()->isVisible()); + listview->setContentY(200); + QTRY_VERIFY(!listview->currentItem()->isVisible()); + delete canvas; } @@ -5648,11 +5655,26 @@ void tst_QQuickListView::displacedTransitions() case ListChange::SetContentY: break; } + + QVariantList resultTargetIndexes = listview->property("displacedTargetIndexes").toList(); + QVariantList resultTargetItems = listview->property("displacedTargetItems").toList(); + if ((useDisplaced && displacedEnabled) || (useAddDisplaced && addDisplacedEnabled) || (useMoveDisplaced && moveDisplacedEnabled) || (useRemoveDisplaced && removeDisplacedEnabled)) { QTRY_VERIFY(listview->property("displaceTransitionsDone").toBool()); + + // check the correct number of target items and indexes were received + QCOMPARE(resultTargetIndexes.count(), expectedDisplacedIndexes.count()); + for (int i=0; i<resultTargetIndexes.count(); i++) + QCOMPARE(resultTargetIndexes[i].value<QList<int> >().count(), change.count); + QCOMPARE(resultTargetItems.count(), expectedDisplacedIndexes.count()); + for (int i=0; i<resultTargetItems.count(); i++) + QCOMPARE(resultTargetItems[i].toList().count(), change.count); + } else { + QCOMPARE(resultTargetIndexes.count(), 0); + QCOMPARE(resultTargetItems.count(), 0); } if (change.type == ListChange::Inserted && useAddDisplaced && addDisplacedEnabled) @@ -5779,8 +5801,6 @@ void tst_QQuickListView::displacedTransitions_data() void tst_QQuickListView::multipleTransitions() { - QSKIP("QTBUG-24523"); - // Tests that if you interrupt a transition in progress with another action that // cancels the previous transition, the resulting items are still placed correctly. @@ -5829,17 +5849,15 @@ void tst_QQuickListView::multipleTransitions() int timeBetweenActions = canvas->rootObject()->property("timeBetweenActions").toInt(); - QList<QPair<QString, QString> > targetItems; for (int i=0; i<changes.count(); i++) { switch (changes[i].type) { case ListChange::Inserted: { + QList<QPair<QString, QString> > targetItems; for (int j=changes[i].index; j<changes[i].index + changes[i].count; ++j) targetItems << qMakePair(QString("new item %1").arg(j), QString::number(j)); model.insertItems(changes[i].index, targetItems); QTRY_COMPARE(model.count(), listview->count()); - QTRY_VERIFY(listview->property("runningAddTargets").toBool()); - QTRY_VERIFY(listview->property("runningAddDisplaced").toBool()); if (i == changes.count() - 1) { QTRY_VERIFY(!listview->property("runningAddTargets").toBool()); QTRY_VERIFY(!listview->property("runningAddDisplaced").toBool()); @@ -5849,12 +5867,8 @@ void tst_QQuickListView::multipleTransitions() break; } case ListChange::Removed: - for (int j=changes[i].index; j<changes[i].index + changes[i].count; ++j) - targetItems << qMakePair(model.name(i), model.number(i)); model.removeItems(changes[i].index, changes[i].count); QTRY_COMPARE(model.count(), listview->count()); - QTRY_VERIFY(listview->property("runningRemoveTargets").toBool()); - QTRY_VERIFY(listview->property("runningRemoveDisplaced").toBool()); if (i == changes.count() - 1) { QTRY_VERIFY(!listview->property("runningRemoveTargets").toBool()); QTRY_VERIFY(!listview->property("runningRemoveDisplaced").toBool()); @@ -5863,11 +5877,8 @@ void tst_QQuickListView::multipleTransitions() } break; case ListChange::Moved: - for (int j=changes[i].index; j<changes[i].index + changes[i].count; ++j) - targetItems << qMakePair(model.name(i), model.number(i)); model.moveItems(changes[i].index, changes[i].to, changes[i].count); - QTRY_VERIFY(listview->property("runningMoveTargets").toBool()); - QTRY_VERIFY(listview->property("runningMoveDisplaced").toBool()); + QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false); if (i == changes.count() - 1) { QTRY_VERIFY(!listview->property("runningMoveTargets").toBool()); QTRY_VERIFY(!listview->property("runningMoveDisplaced").toBool()); @@ -5990,6 +6001,38 @@ void tst_QQuickListView::matchItemLists(const QVariantList &itemLists, const QLi } } +void tst_QQuickListView::flickBeyondBounds() +{ + QQuickView *canvas = createView(); + + canvas->setSource(testFileUrl("flickBeyondBoundsBug.qml")); + canvas->show(); + qApp->processEvents(); + + QQuickListView *listview = findItem<QQuickListView>(canvas->rootObject(), "list"); + QTRY_VERIFY(listview != 0); + + QQuickItem *contentItem = listview->contentItem(); + QTRY_VERIFY(contentItem != 0); + QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false); + + // Flick view up beyond bounds + flick(canvas, QPoint(10, 10), QPoint(10, -1000), 180); + QTRY_VERIFY(findItems<QQuickItem>(contentItem, "wrapper").count() == 0); + + // We're really testing that we don't get stuck in a loop, + // but also confirm items positioned correctly. + QTRY_COMPARE(findItems<QQuickItem>(contentItem, "wrapper").count(), 2); + for (int i = 0; i < 2; ++i) { + QQuickItem *item = findItem<QQuickItem>(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_VERIFY(item->y() == i*45); + } + + delete canvas; +} + QTEST_MAIN(tst_QQuickListView) diff --git a/tests/auto/quick/qquickloader/qquickloader.pro b/tests/auto/quick/qquickloader/qquickloader.pro index fd525351ab..2961ed9429 100644 --- a/tests/auto/quick/qquickloader/qquickloader.pro +++ b/tests/auto/quick/qquickloader/qquickloader.pro @@ -10,9 +10,7 @@ SOURCES += tst_qquickloader.cpp \ include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickmousearea/qquickmousearea.pro b/tests/auto/quick/qquickmousearea/qquickmousearea.pro index c75db5ea55..99e9b9a464 100644 --- a/tests/auto/quick/qquickmousearea/qquickmousearea.pro +++ b/tests/auto/quick/qquickmousearea/qquickmousearea.pro @@ -8,9 +8,7 @@ SOURCES += tst_qquickmousearea.cpp \ include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp index 0fb82a66bc..4375e835aa 100644 --- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp +++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp @@ -72,6 +72,7 @@ private slots: void hoverPosition(); void hoverPropagation(); void hoverVisible(); + void disableAfterPress(); private: QQuickView *createView(); @@ -801,6 +802,110 @@ void tst_QQuickMouseArea::hoverVisible() delete canvas; } +void tst_QQuickMouseArea::disableAfterPress() +{ + QQuickView *canvas = createView(); + canvas->setSource(testFileUrl("dragging.qml")); + canvas->show(); + canvas->requestActivateWindow(); + QTest::qWait(20); + QVERIFY(canvas->rootObject() != 0); + + QQuickMouseArea *mouseArea = canvas->rootObject()->findChild<QQuickMouseArea*>("mouseregion"); + QQuickDrag *drag = mouseArea->drag(); + QVERIFY(mouseArea != 0); + QVERIFY(drag != 0); + + QSignalSpy mousePositionSpy(mouseArea, SIGNAL(positionChanged(QQuickMouseEvent*))); + QSignalSpy mousePressSpy(mouseArea, SIGNAL(pressed(QQuickMouseEvent*))); + QSignalSpy mouseReleaseSpy(mouseArea, SIGNAL(released(QQuickMouseEvent*))); + + // target + QQuickItem *blackRect = canvas->rootObject()->findChild<QQuickItem*>("blackrect"); + QVERIFY(blackRect != 0); + QVERIFY(blackRect == drag->target()); + + QVERIFY(!drag->active()); + + QTest::mousePress(canvas, Qt::LeftButton, 0, QPoint(100,100)); + + QTRY_COMPARE(mousePressSpy.count(), 1); + + QVERIFY(!drag->active()); + QCOMPARE(blackRect->x(), 50.0); + QCOMPARE(blackRect->y(), 50.0); + + // First move event triggers drag, second is acted upon. + // This is due to possibility of higher stacked area taking precedence. + + QTest::mouseMove(canvas, QPoint(111,111)); + QTest::qWait(50); + QTest::mouseMove(canvas, QPoint(122,122)); + + QTRY_COMPARE(mousePositionSpy.count(), 2); + + QVERIFY(drag->active()); + QCOMPARE(blackRect->x(), 72.0); + QCOMPARE(blackRect->y(), 72.0); + + mouseArea->setEnabled(false); + + // move should still be acted upon + QTest::mouseMove(canvas, QPoint(133,133)); + QTest::qWait(50); + QTest::mouseMove(canvas, QPoint(144,144)); + + QTRY_COMPARE(mousePositionSpy.count(), 4); + + QVERIFY(drag->active()); + QCOMPARE(blackRect->x(), 94.0); + QCOMPARE(blackRect->y(), 94.0); + + QVERIFY(mouseArea->pressed()); + QVERIFY(mouseArea->hovered()); + + QTest::mouseRelease(canvas, Qt::LeftButton, 0, QPoint(144,144)); + + QTRY_COMPARE(mouseReleaseSpy.count(), 1); + + QVERIFY(!drag->active()); + QCOMPARE(blackRect->x(), 94.0); + QCOMPARE(blackRect->y(), 94.0); + + QVERIFY(!mouseArea->pressed()); + QVERIFY(!mouseArea->hovered()); // since hover is not enabled + + // Next press will be ignored + blackRect->setX(50); + blackRect->setY(50); + + mousePressSpy.clear(); + mousePositionSpy.clear(); + mouseReleaseSpy.clear(); + + QTest::mousePress(canvas, Qt::LeftButton, 0, QPoint(100,100)); + QTest::qWait(50); + QCOMPARE(mousePressSpy.count(), 0); + + QTest::mouseMove(canvas, QPoint(111,111)); + QTest::qWait(50); + QTest::mouseMove(canvas, QPoint(122,122)); + QTest::qWait(50); + + QCOMPARE(mousePositionSpy.count(), 0); + + QVERIFY(!drag->active()); + QCOMPARE(blackRect->x(), 50.0); + QCOMPARE(blackRect->y(), 50.0); + + QTest::mouseRelease(canvas, Qt::LeftButton, 0, QPoint(122,122)); + QTest::qWait(50); + + QCOMPARE(mouseReleaseSpy.count(), 0); + + delete canvas; +} + QTEST_MAIN(tst_QQuickMouseArea) #include "tst_qquickmousearea.moc" diff --git a/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro b/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro index 3c6f304284..8181eb8c5f 100644 --- a/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro +++ b/tests/auto/quick/qquickmultipointtoucharea/qquickmultipointtoucharea.pro @@ -4,8 +4,6 @@ macx:CONFIG -= app_bundle SOURCES += tst_qquickmultipointtoucharea.cpp -importFiles.files = data -importFiles.path = . -DEPLOYMENT += importFiles +TESTDATA = data/* QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/quick/qquickpath/qquickpath.pro b/tests/auto/quick/qquickpath/qquickpath.pro index e1f0f7b278..59a165bb95 100644 --- a/tests/auto/quick/qquickpath/qquickpath.pro +++ b/tests/auto/quick/qquickpath/qquickpath.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickpath.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickpathview/qquickpathview.pro b/tests/auto/quick/qquickpathview/qquickpathview.pro index 52f00ce3f8..0f2ac8ff0e 100644 --- a/tests/auto/quick/qquickpathview/qquickpathview.pro +++ b/tests/auto/quick/qquickpathview/qquickpathview.pro @@ -7,9 +7,7 @@ SOURCES += tst_qquickpathview.cpp include (../../shared/util.pri) include (../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private widgets testlib diff --git a/tests/auto/quick/qquickpincharea/qquickpincharea.pro b/tests/auto/quick/qquickpincharea/qquickpincharea.pro index 514dd25a5a..31ce4da90a 100644 --- a/tests/auto/quick/qquickpincharea/qquickpincharea.pro +++ b/tests/auto/quick/qquickpincharea/qquickpincharea.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickpincharea.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro b/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro index 7611e37b49..a13b0b6f43 100644 --- a/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro +++ b/tests/auto/quick/qquickpixmapcache/qquickpixmapcache.pro @@ -9,9 +9,7 @@ INCLUDEPATH += ../../shared/ include (../../shared/util.pri) -importFiles.files = data -importFiles.path = . -DEPLOYMENT += importFiles +TESTDATA = data/* # QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage # LIBS += -lgcov diff --git a/tests/auto/quick/qquickpositioners/qquickpositioners.pro b/tests/auto/quick/qquickpositioners/qquickpositioners.pro index 563379652b..243d03484a 100644 --- a/tests/auto/quick/qquickpositioners/qquickpositioners.pro +++ b/tests/auto/quick/qquickpositioners/qquickpositioners.pro @@ -7,9 +7,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/quick/qquickrepeater/qquickrepeater.pro b/tests/auto/quick/qquickrepeater/qquickrepeater.pro index c3d96ee6d5..eb1c9fe9b1 100644 --- a/tests/auto/quick/qquickrepeater/qquickrepeater.pro +++ b/tests/auto/quick/qquickrepeater/qquickrepeater.pro @@ -7,9 +7,7 @@ SOURCES += tst_qquickrepeater.cpp include (../../shared/util.pri) include (../shared/util.pri) -testFiles.files = data -testFiles.path = . -DEPLOYMENT += testFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro b/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro index 0d5567da8d..6f8273956a 100644 --- a/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro +++ b/tests/auto/quick/qquicksmoothedanimation/qquicksmoothedanimation.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquicksmoothedanimation.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickspringanimation/qquickspringanimation.pro b/tests/auto/quick/qquickspringanimation/qquickspringanimation.pro index 8ad472f8cc..8db4c606c9 100644 --- a/tests/auto/quick/qquickspringanimation/qquickspringanimation.pro +++ b/tests/auto/quick/qquickspringanimation/qquickspringanimation.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickspringanimation.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickspriteimage/qquickspriteimage.pro b/tests/auto/quick/qquickspriteimage/qquickspriteimage.pro index 50613792de..02d45b97c4 100644 --- a/tests/auto/quick/qquickspriteimage/qquickspriteimage.pro +++ b/tests/auto/quick/qquickspriteimage/qquickspriteimage.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickspritesequence/qquickspritesequence.pro b/tests/auto/quick/qquickspritesequence/qquickspritesequence.pro index 3dabd065a0..d9b3a9120c 100644 --- a/tests/auto/quick/qquickspritesequence/qquickspritesequence.pro +++ b/tests/auto/quick/qquickspritesequence/qquickspritesequence.pro @@ -6,9 +6,7 @@ include (../../shared/util.pri) macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickstates/qquickstates.pro b/tests/auto/quick/qquickstates/qquickstates.pro index ec881680ea..5f2b8cd2de 100644 --- a/tests/auto/quick/qquickstates/qquickstates.pro +++ b/tests/auto/quick/qquickstates/qquickstates.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickstates.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/quick/qquicktext/qquicktext.pro b/tests/auto/quick/qquicktext/qquicktext.pro index 67e0b9fb90..53e170a115 100644 --- a/tests/auto/quick/qquicktext/qquicktext.pro +++ b/tests/auto/quick/qquicktext/qquicktext.pro @@ -10,9 +10,7 @@ SOURCES += ../../shared/testhttpserver.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquicktextedit/qquicktextedit.pro b/tests/auto/quick/qquicktextedit/qquicktextedit.pro index 39a5178c7d..23459f2a91 100644 --- a/tests/auto/quick/qquicktextedit/qquicktextedit.pro +++ b/tests/auto/quick/qquicktextedit/qquicktextedit.pro @@ -9,8 +9,6 @@ HEADERS += ../../shared/testhttpserver.h include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private network widgets-private testlib diff --git a/tests/auto/quick/qquicktextinput/qquicktextinput.pro b/tests/auto/quick/qquicktextinput/qquicktextinput.pro index 78b39a2981..046e6abcad 100644 --- a/tests/auto/quick/qquicktextinput/qquicktextinput.pro +++ b/tests/auto/quick/qquicktextinput/qquicktextinput.pro @@ -6,8 +6,6 @@ SOURCES += tst_qquicktextinput.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib diff --git a/tests/auto/quick/qquickview/qquickview.pro b/tests/auto/quick/qquickview/qquickview.pro index 77b0f7d86a..1302908bf7 100644 --- a/tests/auto/quick/qquickview/qquickview.pro +++ b/tests/auto/quick/qquickview/qquickview.pro @@ -6,8 +6,6 @@ SOURCES += tst_qquickview.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* QT += core-private gui-private qml-private quick-private testlib diff --git a/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro index bfadf196f9..4ae678181a 100644 --- a/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro +++ b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro @@ -7,9 +7,7 @@ SOURCES += tst_qquickvisualdatamodel.cpp include (../../shared/util.pri) include (../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro b/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro index b18af50c9e..88975d8665 100644 --- a/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro +++ b/tests/auto/quick/qquickxmllistmodel/qquickxmllistmodel.pro @@ -6,9 +6,7 @@ SOURCES += tst_qquickxmllistmodel.cpp include (../../shared/util.pri) -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* CONFIG += parallel_test diff --git a/tests/auto/quick/rendernode/rendernode.pro b/tests/auto/quick/rendernode/rendernode.pro index 8484d591e5..3e52cda676 100644 --- a/tests/auto/quick/rendernode/rendernode.pro +++ b/tests/auto/quick/rendernode/rendernode.pro @@ -4,9 +4,7 @@ SOURCES += tst_rendernode.cpp macx:CONFIG -= app_bundle -testDataFiles.files = data -testDataFiles.path = . -DEPLOYMENT += testDataFiles +TESTDATA = data/* include(../../shared/util.pri) diff --git a/tests/testapplications/elements/content/BugPanel.qml b/tests/testapplications/elements/content/BugPanel.qml index d1d99016c3..9f957ec232 100644 --- a/tests/testapplications/elements/content/BugPanel.qml +++ b/tests/testapplications/elements/content/BugPanel.qml @@ -45,7 +45,7 @@ Rectangle { property string urltext urltext: "<a href=\"" + bugreports + bugnumber + "\">QTBUG-" + bugnumber + "</a>" property string bugnumber: "" - property string bugreports: "http://bugreports.qt.nokia.com/browse/QTBUG-" + property string bugreports: "http://bugreports.qt-project.org/browse/QTBUG-" visible: opacity != 0 opacity: bugnumber == "" ? 0 : 1 Behavior on opacity { NumberAnimation { duration: 1500 } } |