diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-01-20 14:35:27 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-23 03:43:09 +0100 |
commit | 4caff98315c55d162319648eb87177212adb8e9d (patch) | |
tree | 1c2d89a00dbf6d6723f388bfd2b8208ba87f6eda /tests/auto | |
parent | 599536d18f7c671d94e70524b5ac7b37d88d5099 (diff) |
Avoid anchor/positioning loops
Task-number: QTBUG-23740
Change-Id: I84922ac2dc6e499fc22b923298ca31eda382c622
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp b/tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp index 9725390e47..fd08345441 100644 --- a/tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp +++ b/tests/auto/qtquick2/qquickanchors/tst_qquickanchors.cpp @@ -482,7 +482,7 @@ void tst_qquickanchors::crash1() { QUrl source(testFileUrl("crash1.qml")); - QString expect = source.toString() + ":3:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column"; + QString expect = source.toString() + ":3:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column. Column will not function."; QTest::ignoreMessage(QtWarningMsg, expect.toLatin1()); diff --git a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp index 441c343927..08ae5e284a 100644 --- a/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp +++ b/tests/auto/qtquick2/qquickpositioners/tst_qquickpositioners.cpp @@ -1206,14 +1206,14 @@ void tst_qquickpositioners::test_conflictinganchors() component.setData("import QtQuick 2.0\nColumn { Item { anchors.top: parent.top } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column")); + QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column. Column will not function.")); warningMessage.clear(); delete item; component.setData("import QtQuick 2.0\nColumn { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column")); + QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column. Column will not function.")); warningMessage.clear(); delete item; @@ -1227,14 +1227,14 @@ void tst_qquickpositioners::test_conflictinganchors() component.setData("import QtQuick 2.0\nRow { Item { anchors.left: parent.left } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row")); + QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row. Row will not function.")); warningMessage.clear(); delete item; component.setData("import QtQuick 2.0\nRow { Item { anchors.fill: parent } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row")); + QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row. Row will not function.")); warningMessage.clear(); delete item; @@ -1248,27 +1248,27 @@ void tst_qquickpositioners::test_conflictinganchors() component.setData("import QtQuick 2.0\nGrid { Item { anchors.horizontalCenter: parent.horizontalCenter } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid")); + QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid. Grid will not function.")); warningMessage.clear(); delete item; component.setData("import QtQuick 2.0\nGrid { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid")); + QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid. Grid will not function.")); warningMessage.clear(); delete item; component.setData("import QtQuick 2.0\nFlow { Item { anchors.verticalCenter: parent.verticalCenter } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow")); + QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow. Flow will not function.")); delete item; component.setData("import QtQuick 2.0\nFlow { Item { anchors.fill: parent } }", QUrl::fromLocalFile("")); item = qobject_cast<QQuickItem*>(component.create()); QVERIFY(item); - QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow")); + QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow. Flow will not function.")); qInstallMsgHandler(oldMsgHandler); delete item; } |