summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-09 05:58:35 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-09 05:58:35 (GMT)
commit4a40a67827c8f259876e906a5a9afd2159ca9028 (patch)
tree06f82400d11677979a425d6392dd3241769737dd /tests/auto/declarative/qmlvisual
parent475abec27948923ae6de74db53b137f19c661601 (diff)
downloadQt-4a40a67827c8f259876e906a5a9afd2159ca9028.zip
Qt-4a40a67827c8f259876e906a5a9afd2159ca9028.tar.gz
Qt-4a40a67827c8f259876e906a5a9afd2159ca9028.tar.bz2
Enable other wrapping modes.
WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word. WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
Diffstat (limited to 'tests/auto/declarative/qmlvisual')
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml6
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml19
3 files changed, 28 insertions, 3 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
index c44088b..90b5411 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml
@@ -81,5 +81,11 @@ Rectangle {
Text {
text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
}
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
+ }
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ }
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
index b5d05da..0dba47c 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml
@@ -81,5 +81,11 @@ Rectangle {
Text {
text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap
}
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere
+ }
+ Text {
+ text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAtWordBoundaryOrAnywhere
+ }
}
}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
index af69994..b2a0754 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml
@@ -5,17 +5,30 @@ Item {
width: 200
TextEdit {
width: 200
- height: 200
+ height: 100
wrapMode: TextEdit.WordWrap
focus: true
}
//With QTBUG-6273 only the bottom one would be wrapped
TextEdit {
width: 200
- height: 200
+ height: 100
wrapMode: TextEdit.WordWrap
text: "This is a test that text edit wraps correctly."
+ y:100
+ }
+ TextEdit {
+ width: 150
+ height: 100
+ wrapMode: TextEdit.WrapAnywhere
+ text: "This is a test that text edit wraps correctly. thisisaverylongstringwithnospaces"
y:200
}
-
+ TextEdit {
+ width: 150
+ height: 100
+ wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
+ text: "This is a test that text edit wraps correctly. thisisaverylongstringwithnospaces"
+ y:300
+ }
}