diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-04-08 03:04:13 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-04-08 03:04:13 (GMT) |
commit | 71f9283df3caabadcfb04e2ab6f57305cd73c0d1 (patch) | |
tree | 99489117c607f5c7039d3dd8fb4d647121d23eab /tests/auto/declarative/qdeclarativetext | |
parent | e005c3048ee69be668a6b4903ce281500543d454 (diff) | |
download | Qt-71f9283df3caabadcfb04e2ab6f57305cd73c0d1.zip Qt-71f9283df3caabadcfb04e2ab6f57305cd73c0d1.tar.gz Qt-71f9283df3caabadcfb04e2ab6f57305cd73c0d1.tar.bz2 |
Replace Text::wrap property with Text::wrapMode enumeration.
wrap remains for a little while, and will produce a warning.
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r-- | tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index bbbbd83..bf7d110 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -251,18 +251,18 @@ void tst_qdeclarativetext::wrap() // for specified width and wrap set true { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; wrap: true; width: 300 }", QUrl::fromLocalFile("")); + textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create()); textHeight = textObject->height(); QVERIFY(textObject != 0); - QVERIFY(textObject->wrap() == true); + QVERIFY(textObject->wrapMode() == QDeclarativeText::WordWrap); QCOMPARE(textObject->width(), 300.); } for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.6\nText { wrap: true; width: 30; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import Qt 4.6\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create()); @@ -278,7 +278,7 @@ void tst_qdeclarativetext::wrap() for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.6\nText { wrap: true; width: 30; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import Qt 4.6\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create()); |