From cb5054ec8a783bac6c93946a0c321f8c3b093880 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Wed, 20 Jan 2016 09:44:43 +0200 Subject: Fixed qtdeclarative tests to pass with updated license header Change-Id: I3c826a7b3ee9ff66fac89a7a3d6f0e7057f03eed Reviewed-by: Antti Kokko --- .../tst_qdebugmessageservice.cpp | 4 +- .../qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp | 52 +++++++++++----------- tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 16 +++---- .../qqmlenginecleanup/tst_qqmlenginecleanup.cpp | 2 +- tests/auto/qml/qqmlimport/tst_qqmlimport.cpp | 2 +- tests/auto/quick/qquickitem2/tst_qquickitem.cpp | 8 ++-- 6 files changed, 42 insertions(+), 42 deletions(-) diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp index 75c301f958..0bb01d77fd 100644 --- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp +++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp @@ -228,12 +228,12 @@ void tst_QDebugMessageService::retrieveDebugOutput() const QString path = QUrl::fromLocalFile(QQmlDataTest::instance()->testFile(QMLFILE)).toString(); LogEntry entry1(QtDebugMsg, QLatin1String("console.log")); - entry1.line = 40; + entry1.line = 35; entry1.file = path; entry1.function = QLatin1String("onCompleted"); entry1.category = QLatin1String("qml"); LogEntry entry2(QtDebugMsg, QLatin1String("console.count: 1")); - entry2.line = 41; + entry2.line = 36; entry2.file = path; entry2.function = QLatin1String("onCompleted"); entry2.category = QLatin1String("default"); diff --git a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp index c603e19bbf..34ca4eb3ac 100644 --- a/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp +++ b/tests/auto/qml/debugger/qqmldebugjs/qqmldebugjs/tst_qqmldebugjs.cpp @@ -919,7 +919,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptOnCompleted() //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) QFETCH(bool, qmlscene); - int sourceLine = 39; + int sourceLine = 34; init(qmlscene, ONCOMPLETED_QMLFILE); client->setBreakpoint(QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); @@ -940,7 +940,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptOnComponentCreated() //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) QFETCH(bool, qmlscene); - int sourceLine = 39; + int sourceLine = 34; init(qmlscene, CREATECOMPONENT_QMLFILE); client->setBreakpoint(QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); @@ -959,7 +959,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptOnComponentCreated() void tst_QQmlDebugJS::setBreakpointInScriptOnTimerCallback() { QFETCH(bool, qmlscene); - int sourceLine = 40; + int sourceLine = 35; init(qmlscene, TIMER_QMLFILE); client->connect(); @@ -982,7 +982,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptInDifferentFile() //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) QFETCH(bool, qmlscene); - int sourceLine = 35; + int sourceLine = 31; init(qmlscene, LOADJSFILE_QMLFILE); client->setBreakpoint(QLatin1String(TEST_JSFILE), sourceLine, -1, true); @@ -1003,8 +1003,8 @@ void tst_QQmlDebugJS::setBreakpointInScriptOnComment() //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) QFETCH(bool, qmlscene); - int sourceLine = 39; - int actualLine = 41; + int sourceLine = 34; + int actualLine = 36; init(qmlscene, BREAKPOINTRELOCATION_QMLFILE); client->setBreakpoint(QLatin1String(BREAKPOINTRELOCATION_QMLFILE), sourceLine, -1, true); @@ -1026,8 +1026,8 @@ void tst_QQmlDebugJS::setBreakpointInScriptOnEmptyLine() //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) QFETCH(bool, qmlscene); - int sourceLine = 40; - int actualLine = 41; + int sourceLine = 35; + int actualLine = 36; init(qmlscene, BREAKPOINTRELOCATION_QMLFILE); client->setBreakpoint(QLatin1String(BREAKPOINTRELOCATION_QMLFILE), sourceLine, -1, true); @@ -1049,7 +1049,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptOnOptimizedBinding() //void setBreakpoint(QString type, QString target, int line = -1, int column = -1, bool enabled = false, QString condition = QString(), int ignoreCount = -1) QFETCH(bool, qmlscene); - int sourceLine = 44; + int sourceLine = 39; init(qmlscene, BREAKPOINTRELOCATION_QMLFILE); client->setBreakpoint(QLatin1String(BREAKPOINTRELOCATION_QMLFILE), sourceLine, -1, true); @@ -1069,7 +1069,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptWithCondition() { QFETCH(bool, qmlscene); int out = 10; - int sourceLine = 42; + int sourceLine = 37; init(qmlscene, CONDITION_QMLFILE); client->connect(); @@ -1107,7 +1107,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptThatQuits() QFETCH(bool, qmlscene); init(qmlscene, QUIT_QMLFILE); - int sourceLine = 41; + int sourceLine = 36; client->setBreakpoint(QLatin1String(QUIT_QMLFILE), sourceLine, -1, true); client->connect(); @@ -1128,7 +1128,7 @@ void tst_QQmlDebugJS::setBreakpointInScriptThatQuits() void tst_QQmlDebugJS::setBreakpointWhenAttaching() { - int sourceLine = 40; + int sourceLine = 35; init(true, QLatin1String(TIMER_QMLFILE), false); client->connect(); @@ -1148,8 +1148,8 @@ void tst_QQmlDebugJS::clearBreakpoint() //void clearBreakpoint(int breakpoint); QFETCH(bool, qmlscene); - int sourceLine1 = 42; - int sourceLine2 = 43; + int sourceLine1 = 37; + int sourceLine2 = 38; init(qmlscene, CHANGEBREAKPOINT_QMLFILE); client->connect(); @@ -1207,7 +1207,7 @@ void tst_QQmlDebugJS::stepNext() //void continueDebugging(StepAction stepAction, int stepCount = 1); QFETCH(bool, qmlscene); - int sourceLine = 42; + int sourceLine = 37; init(qmlscene, STEPACTION_QMLFILE); client->setBreakpoint(QLatin1String(STEPACTION_QMLFILE), sourceLine, -1, true); @@ -1231,8 +1231,8 @@ void tst_QQmlDebugJS::stepIn() //void continueDebugging(StepAction stepAction, int stepCount = 1); QFETCH(bool, qmlscene); - int sourceLine = 46; - int actualLine = 42; + int sourceLine = 41; + int actualLine = 37; init(qmlscene, STEPACTION_QMLFILE); client->setBreakpoint(QLatin1String(STEPACTION_QMLFILE), sourceLine, 1, true); @@ -1256,8 +1256,8 @@ void tst_QQmlDebugJS::stepOut() //void continueDebugging(StepAction stepAction, int stepCount = 1); QFETCH(bool, qmlscene); - int sourceLine = 42; - int actualLine = 46; + int sourceLine = 37; + int actualLine = 41; init(qmlscene, STEPACTION_QMLFILE); client->setBreakpoint(QLatin1String(STEPACTION_QMLFILE), sourceLine, -1, true); @@ -1281,8 +1281,8 @@ void tst_QQmlDebugJS::continueDebugging() //void continueDebugging(StepAction stepAction, int stepCount = 1); QFETCH(bool, qmlscene); - int sourceLine1 = 46; - int sourceLine2 = 43; + int sourceLine1 = 41; + int sourceLine2 = 38; init(qmlscene, STEPACTION_QMLFILE); client->setBreakpoint(QLatin1String(STEPACTION_QMLFILE), sourceLine1, -1, true); @@ -1307,7 +1307,7 @@ void tst_QQmlDebugJS::backtrace() //void backtrace(int fromFrame = -1, int toFrame = -1, bool bottom = false); QFETCH(bool, qmlscene); - int sourceLine = 39; + int sourceLine = 34; init(qmlscene, ONCOMPLETED_QMLFILE); client->setBreakpoint(QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); @@ -1323,7 +1323,7 @@ void tst_QQmlDebugJS::getFrameDetails() //void frame(int number = -1); QFETCH(bool, qmlscene); - int sourceLine = 39; + int sourceLine = 34; init(qmlscene, ONCOMPLETED_QMLFILE); client->setBreakpoint(QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); @@ -1339,7 +1339,7 @@ void tst_QQmlDebugJS::getScopeDetails() //void scope(int number = -1, int frameNumber = -1); QFETCH(bool, qmlscene); - int sourceLine = 39; + int sourceLine = 34; init(qmlscene, ONCOMPLETED_QMLFILE); client->setBreakpoint(QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); @@ -1374,7 +1374,7 @@ void tst_QQmlDebugJS::evaluateInLocalScope() //void evaluate(QString expr, bool global = false, bool disableBreak = false, int frame = -1, const QVariantMap &addContext = QVariantMap()); QFETCH(bool, qmlscene); - int sourceLine = 39; + int sourceLine = 34; init(qmlscene, ONCOMPLETED_QMLFILE); client->setBreakpoint(QLatin1String(ONCOMPLETED_QMLFILE), sourceLine, -1, true); @@ -1411,7 +1411,7 @@ void tst_QQmlDebugJS::getScripts() QFETCH(bool, qmlscene); init(qmlscene); - client->setBreakpoint(QString(TEST_QMLFILE), 40, -1, true); + client->setBreakpoint(QString(TEST_QMLFILE), 35, -1, true); client->connect(); QVERIFY(QQmlDebugTest::waitForSignal(client, SIGNAL(stopped()))); diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index 98e3a53b81..9d48042ca2 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -97,8 +97,8 @@ void tst_qqmlconsole::tracing() QUrl testUrl = testFileUrl("tracing.qml"); QString traceText = - QString::fromLatin1("tracing (%1:%2)\n").arg(testUrl.toString()).arg(42) + - QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(46); + QString::fromLatin1("tracing (%1:%2)\n").arg(testUrl.toString()).arg(37) + + QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(41); QTest::ignoreMessage(QtDebugMsg, qPrintable(traceText)); @@ -128,11 +128,11 @@ void tst_qqmlconsole::testAssert() // assert() QString assert1 = "This will fail\n" + - QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(46); + QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(41); QString assert2 = "This will fail too\n" + - QString::fromLatin1("assertFail (%1:%2)\n").arg(testUrl.toString()).arg(39) + - QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(51); + QString::fromLatin1("assertFail (%1:%2)\n").arg(testUrl.toString()).arg(34) + + QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(46); QTest::ignoreMessage(QtCriticalMsg, qPrintable(assert1)); QTest::ignoreMessage(QtCriticalMsg, qPrintable(assert2)); @@ -149,11 +149,11 @@ void tst_qqmlconsole::exception() // exception() QString exception1 = "Exception 1\n" + - QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(43); + QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(38); QString exception2 = "Exception 2\n" + - QString::fromLatin1("exceptionFail (%1:%2)\n").arg(testUrl.toString()).arg(38) + - QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(48); + QString::fromLatin1("exceptionFail (%1:%2)\n").arg(testUrl.toString()).arg(33) + + QString::fromLatin1("onCompleted (%1:%2)").arg(testUrl.toString()).arg(43); QTest::ignoreMessage(QtCriticalMsg, qPrintable(exception1)); QTest::ignoreMessage(QtCriticalMsg, qPrintable(exception2)); diff --git a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp index b95f6ad55c..f24fdc680b 100644 --- a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp +++ b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp @@ -80,7 +80,7 @@ void tst_qqmlenginecleanup::test_qmlClearTypeRegistrations() component = new QQmlComponent(engine, testFile); QVERIFY(component->isError()); QCOMPARE(component->errorString(), - testFile.toString() +":38 module \"Test\" is not installed\n"); + testFile.toString() +":33 module \"Test\" is not installed\n"); delete engine; delete component; diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp index 1f495c3581..c6a06385dc 100644 --- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp +++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp @@ -77,7 +77,7 @@ void tst_QQmlImport::testDesignerSupported() window->setSource(testFileUrl("testfile_supported.qml")); QVERIFY(window->errors().isEmpty()); - QString warningString("%1:35:1: module does not support the designer \"MyPluginUnsupported\" \n import MyPluginUnsupported 1.0\r \n ^ "); + QString warningString("%1:30:1: module does not support the designer \"MyPluginUnsupported\" \n import MyPluginUnsupported 1.0\r \n ^ "); #ifndef Q_OS_WIN warningString.remove('\r'); #endif diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index 518e248207..fa6d066cce 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -2254,8 +2254,8 @@ void tst_QQuickItem::mapCoordinates() Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y))); QCOMPARE(result.value(), qobject_cast(a)->mapFromScene(QPointF(x, y))); - QString warning1 = testFileUrl("mapCoordinates.qml").toString() + ":40:5: QML Item: mapToItem() given argument \"1122\" which is neither null nor an Item"; - QString warning2 = testFileUrl("mapCoordinates.qml").toString() + ":40:5: QML Item: mapFromItem() given argument \"1122\" which is neither null nor an Item"; + QString warning1 = testFileUrl("mapCoordinates.qml").toString() + ":35:5: QML Item: mapToItem() given argument \"1122\" which is neither null nor an Item"; + QString warning2 = testFileUrl("mapCoordinates.qml").toString() + ":35:5: QML Item: mapFromItem() given argument \"1122\" which is neither null nor an Item"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); QVERIFY(QMetaObject::invokeMethod(root, "checkMapAToInvalid", @@ -2317,8 +2317,8 @@ void tst_QQuickItem::mapCoordinatesRect() Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, x), Q_ARG(QVariant, y), Q_ARG(QVariant, width), Q_ARG(QVariant, height))); QCOMPARE(result.value(), qobject_cast(a)->mapRectFromScene(QRectF(x, y, width, height))); - QString warning1 = testFileUrl("mapCoordinatesRect.qml").toString() + ":40:5: QML Item: mapToItem() given argument \"1122\" which is neither null nor an Item"; - QString warning2 = testFileUrl("mapCoordinatesRect.qml").toString() + ":40:5: QML Item: mapFromItem() given argument \"1122\" which is neither null nor an Item"; + QString warning1 = testFileUrl("mapCoordinatesRect.qml").toString() + ":35:5: QML Item: mapToItem() given argument \"1122\" which is neither null nor an Item"; + QString warning2 = testFileUrl("mapCoordinatesRect.qml").toString() + ":35:5: QML Item: mapFromItem() given argument \"1122\" which is neither null nor an Item"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); QVERIFY(QMetaObject::invokeMethod(root, "checkMapAToInvalid", -- cgit v1.2.3