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/auto/qml | |
parent | 3bc907d155034fe64efc8cb6056b48f0c6401bfb (diff) | |
parent | 70966df1be02dd94ecf9a122ff9e4976245aeb92 (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Change-Id: I121cb9c9316b5e47476dcb982bc28b6f3f358f78
Diffstat (limited to 'tests/auto/qml')
46 files changed, 126 insertions, 118 deletions
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 |