summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-08 03:04:13 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-08 03:04:13 (GMT)
commit71f9283df3caabadcfb04e2ab6f57305cd73c0d1 (patch)
tree99489117c607f5c7039d3dd8fb4d647121d23eab /tests/auto/declarative
parente005c3048ee69be668a6b4903ce281500543d454 (diff)
downloadQt-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')
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/reset.qml2
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml8
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml8
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml
index 8e9b13a..7da80b3 100644
--- a/tests/auto/declarative/qdeclarativestates/data/reset.qml
+++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml
@@ -6,7 +6,7 @@ Rectangle {
Text {
id: theText
width: 40
- wrap: true
+ wrapMode: Text.WordWrap
text: "a text string that is longer than 40 pixels"
}
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());
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
index a3aa929..c44088b 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
@@ -61,7 +61,7 @@ Rectangle {
text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
}
Text {
- text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrap: true; width: 200
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
}
Text {
text: s.text; elide: Text.ElideLeft; width: 200
@@ -73,13 +73,13 @@ Rectangle {
text: s.text; elide: Text.ElideRight; width: 200
}
Text {
- text: s.text; elide: Text.ElideLeft; width: 200; wrap: true
+ text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideMiddle; width: 200; wrap: true
+ text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideRight; width: 200; wrap: true
+ text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
}
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
index 35aa232..b5d05da 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
@@ -61,7 +61,7 @@ Rectangle {
text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: 800; height: 20
}
Text {
- text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrap: true; width: 200
+ text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200
}
Text {
text: s.text; elide: Text.ElideLeft; width: 200
@@ -73,13 +73,13 @@ Rectangle {
text: s.text; elide: Text.ElideRight; width: 200
}
Text {
- text: s.text; elide: Text.ElideLeft; width: 200; wrap: true
+ text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideMiddle; width: 200; wrap: true
+ text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap
}
Text {
- text: s.text; elide: Text.ElideRight; width: 200; wrap: true
+ text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
}
}
}