summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeanimations
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-19 04:08:20 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-19 04:08:20 (GMT)
commit7aedb72dea904981969c0a4a9e5a6b721381c5a9 (patch)
tree820f58eace02ec8e0e001ba7faf28af23c58296e /tests/auto/declarative/qdeclarativeanimations
parent118890afb8b0a56d702d0822891d6417665ab515 (diff)
downloadQt-7aedb72dea904981969c0a4a9e5a6b721381c5a9.zip
Qt-7aedb72dea904981969c0a4a9e5a6b721381c5a9.tar.gz
Qt-7aedb72dea904981969c0a4a9e5a6b721381c5a9.tar.bz2
Emit runtime warnings through QDeclarativeEngine
QTBUG-9726
Diffstat (limited to 'tests/auto/declarative/qdeclarativeanimations')
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index 959cc19..e217e34 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -339,13 +339,13 @@ void tst_qdeclarativeanimations::badProperties()
QDeclarativeEngine engine;
QDeclarativeComponent c1(&engine, QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml"));
- QByteArray message = "QML ColorAnimation (" + QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml").toString().toUtf8() + ":18:9) Cannot animate non-existent property \"border.colr\"";
+ QByteArray message = QUrl::fromLocalFile(SRCDIR "/data/badproperty1.qml").toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate non-existent property \"border.colr\"";
QTest::ignoreMessage(QtWarningMsg, message);
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c1.create());
QVERIFY(rect);
QDeclarativeComponent c2(&engine, QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml"));
- message = "QML ColorAnimation (" + QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml").toString().toUtf8() + ":18:9) Cannot animate read-only property \"border\"";
+ message = QUrl::fromLocalFile(SRCDIR "/data/badproperty2.qml").toString().toUtf8() + ":18:9: QML ColorAnimation: Cannot animate read-only property \"border\"";
QTest::ignoreMessage(QtWarningMsg, message);
rect = qobject_cast<QDeclarativeRectangle*>(c2.create());
QVERIFY(rect);
@@ -549,12 +549,12 @@ void tst_qdeclarativeanimations::propertiesTransition()
void tst_qdeclarativeanimations::invalidDuration()
{
QDeclarativePropertyAnimation *animation = new QDeclarativePropertyAnimation;
- QTest::ignoreMessage(QtWarningMsg, "QML PropertyAnimation (unknown location) Cannot set a duration of < 0");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML PropertyAnimation: Cannot set a duration of < 0");
animation->setDuration(-1);
QCOMPARE(animation->duration(), 250);
QDeclarativePauseAnimation *pauseAnimation = new QDeclarativePauseAnimation;
- QTest::ignoreMessage(QtWarningMsg, "QML PauseAnimation (unknown location) Cannot set a duration of < 0");
+ QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML PauseAnimation: Cannot set a duration of < 0");
pauseAnimation->setDuration(-1);
QCOMPARE(pauseAnimation->duration(), 250);
}
@@ -620,7 +620,8 @@ void tst_qdeclarativeanimations::dontStart()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QString warning = c.url().toString() + ":14:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes.";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
@@ -634,7 +635,8 @@ void tst_qdeclarativeanimations::dontStart()
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/dontStart2.qml"));
- QTest::ignoreMessage(QtWarningMsg, "QDeclarativeAbstractAnimation: setRunning() cannot be used on non-root animation nodes");
+ QString warning = c.url().toString() + ":15:17: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes.";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);