diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-11-04 08:01:36 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-11-04 08:01:36 (GMT) |
commit | d5ed9ed21b67b6e5e884e7c87fabc096b8c677a2 (patch) | |
tree | d1618ef434f005a9f9e30c941257b96b7ea6a4a7 /tests/auto/declarative/qmlvisual/qdeclarativetext | |
parent | 032bea71a17e6c79346b2df926a5755a22a3d95b (diff) | |
download | Qt-d5ed9ed21b67b6e5e884e7c87fabc096b8c677a2.zip Qt-d5ed9ed21b67b6e5e884e7c87fabc096b8c677a2.tar.gz Qt-d5ed9ed21b67b6e5e884e7c87fabc096b8c677a2.tar.bz2 |
Make qmlvisual tests more stable
Text elements now use shared components that have the same default
values, instead of using the system defaults (that can vary between
computers). This also removes text edit/input cursor blinking.
Task-number: QTBUG-14792
Diffstat (limited to 'tests/auto/declarative/qmlvisual/qdeclarativetext')
15 files changed, 171 insertions, 161 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/multilineAlign.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/multilineAlign.qml index 976f0b0..a427719 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/multilineAlign.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/multilineAlign.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 /*Tests both the alignments of multiline text, and that it can deal with changing them properly @@ -8,7 +9,7 @@ Item{ height: 80 property int stage: 0 onStageChanged: if(stage == 6) Qt.quit(); - Text{ + TestText{ text: "I am the very model of a modern major general." anchors.fill: parent; wrapMode: Text.WordWrap diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml index c1920db..618a65f 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml @@ -1,13 +1,14 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { id: s; width: 600; height: 100; property string text: "The quick brown fox jumps over the lazy dog." - Text { + TestText { text: s.text anchors.verticalCenter: s.verticalCenter } - Text { + TestText { text: s.text anchors.baseline: s.verticalCenter } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml index ea3a939..aca7c2d 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 /* The bug was that if text was set to "" or the size didn't increase, the text didn't repaint ended up only repainting for 1, 10, 11, 12. diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.0.png Binary files differindex b250b38..de216ba 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.0.png +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml index f3bc1db..fcaeed5 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.qml @@ -6,239 +6,239 @@ VisualTest { } Frame { msec: 16 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 32 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 48 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 64 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 80 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 96 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 112 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 128 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 144 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 160 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 176 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 192 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 208 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 224 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 240 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 256 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 272 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 288 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 304 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 320 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 336 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 352 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 368 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 384 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 400 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 416 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 432 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 448 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 464 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 480 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 496 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 512 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 528 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 544 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 560 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 576 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 592 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 608 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 624 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 640 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 656 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 672 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 688 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 704 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 720 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 736 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 752 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 768 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 784 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 800 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 816 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 832 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 848 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 864 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 880 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 896 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 912 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 928 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 944 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 960 @@ -246,34 +246,34 @@ VisualTest { } Frame { msec: 976 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Key { type: 6 key: 16777249 - modifiers: 0 + modifiers: 67108864 text: "" autorep: false count: 1 } Frame { msec: 992 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 1008 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 1024 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 1040 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } Frame { msec: 1056 - hash: "9992670f23580ce63cdd3ab3fed621a1" + hash: "bdf278826a033dbb744d1fa9492c9351" } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml index 5d36d48..3871f91 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.qml @@ -6,71 +6,71 @@ VisualTest { } Frame { msec: 16 - hash: "a9dc5058e29f9c129087eaa013002185" + hash: "51e3a7214bf2fd98108de683ae650b05" } Frame { msec: 32 - hash: "da0d63697414c19f57235c4d133faf63" + hash: "72bd0f47e179c5356d4a0575939b6c05" } Frame { msec: 48 - hash: "e3992f5512959c061d53fc3899acec14" + hash: "9229869bf23fe10394ffb6bacc38d2b5" } Frame { msec: 64 - hash: "e225de5dc21fee719ebc43fa8838f841" + hash: "4f75c0a0b7a04c8abdf2768a819b6c14" } Frame { msec: 80 - hash: "a5673b8b7ad5a9d67e785beaaa4c0307" + hash: "514a9a762cd0356cbcecb93e73c81534" } Frame { msec: 96 - hash: "2c126bf2d794039e1380595b9c40ae2e" + hash: "68436451f6f3ee981bf8851944b82dda" } Frame { msec: 112 - hash: "f974072b4863b842b520b4c11c427f5d" + hash: "fa33b582c0890bc9852f3a6c80864988" } Frame { msec: 128 - hash: "bf06ec5a2c1c46e780cdd0d859b2becb" + hash: "f65928b270f12f2917193ba70d9388ee" } Frame { msec: 144 - hash: "3a58b1900912a5a6ace72757f3af4d1a" + hash: "755d1421a9b2bf3be9d665f5f8d6f767" } Frame { msec: 160 - hash: "3fa86df29f53e7f6f65fb6e605f5e705" + hash: "dbec63b93f3617440317f7ddc2fbd6fa" } Frame { msec: 176 - hash: "6d29c12395050b049537819cf0a65746" + hash: "1ec885da7efc3d71904c79a4a4768f27" } Frame { msec: 192 - hash: "352a390ab4e3e31b645f025e65885cfc" + hash: "a20981af2ce8e82a6c1825e438dfd815" } Frame { msec: 208 - hash: "7c3be9d325f023a356b6ed73332bc804" + hash: "3c951028229d8d6a3a0faa18f21afbe6" } Frame { msec: 224 - hash: "09dd10566eda09e0366b7bf0a8ce9e1b" + hash: "8354d4c9bd5ccb2eae46cdaf3fd337bb" } Frame { msec: 240 - hash: "6cafcba107e48f7efe2db60a14c3749d" + hash: "05880d6d76fa8dc421af4d06cbdd4448" } Frame { msec: 256 - hash: "a4b6df2874ce48ed5a17aab43f32e665" + hash: "370e33f141d0a8396b5c2bb279f9bb67" } Frame { msec: 272 - hash: "b6a3df4b704fa7e8284572b9c520b03d" + hash: "663b162ce447eee0f2194a92b463d6fe" } Frame { msec: 288 @@ -1258,66 +1258,66 @@ VisualTest { } Frame { msec: 5024 - hash: "a9dc5058e29f9c129087eaa013002185" + hash: "51e3a7214bf2fd98108de683ae650b05" } Frame { msec: 5040 - hash: "5d06ae83ab9cc218175013042922b908" + hash: "af3da99b9abc3b3440b22d4d428dcd1a" } Frame { msec: 5056 - hash: "e225de5dc21fee719ebc43fa8838f841" + hash: "4f75c0a0b7a04c8abdf2768a819b6c14" } Frame { msec: 5072 - hash: "b89bf31a945cb6c880e95bf2d2a6e944" + hash: "c73dc19d48511634717cf4e95f843a5d" } Frame { msec: 5088 - hash: "fa54db3c383bc1da121c0d3b09e942d3" + hash: "0f263ab43dde78f1280483c6287b44a2" } Frame { msec: 5104 - hash: "2c126bf2d794039e1380595b9c40ae2e" + hash: "68436451f6f3ee981bf8851944b82dda" } Frame { msec: 5120 - hash: "1e9639693e5ec1edb72e71d126c434bb" + hash: "e0ea33b011cc8aef74070e26b71bd05e" } Frame { msec: 5136 - hash: "3a58b1900912a5a6ace72757f3af4d1a" + hash: "755d1421a9b2bf3be9d665f5f8d6f767" } Frame { msec: 5152 - hash: "11a846d93430e622a9750e4e2a7b76fe" + hash: "7e20da3dab6bd290498756ac392bc052" } Frame { msec: 5168 - hash: "801d7707e86b776fe2459c42b26337f5" + hash: "babdfa14fbba8f6eb0c95334588123ce" } Frame { msec: 5184 - hash: "6d29c12395050b049537819cf0a65746" + hash: "1ec885da7efc3d71904c79a4a4768f27" } Frame { msec: 5200 - hash: "5a68af870474ffb8a694710b10f52bc7" + hash: "2159f4c9f72bca3ba98b4fd0aeb3c1ba" } Frame { msec: 5216 - hash: "09dd10566eda09e0366b7bf0a8ce9e1b" + hash: "8354d4c9bd5ccb2eae46cdaf3fd337bb" } Frame { msec: 5232 - hash: "f43b377f99f74e2cf07e419887f7ee0b" + hash: "ee95872db6f9440800bb98023764dc2a" } Frame { msec: 5248 - hash: "108287fc253d36a5ebf8582ef2a5fd57" + hash: "23197dd2bb352193b72d4445912d9c94" } Frame { msec: 5264 - hash: "a4b6df2874ce48ed5a17aab43f32e665" + hash: "370e33f141d0a8396b5c2bb279f9bb67" } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml index b96ecb3..e52c609 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { width: childrenRect.width @@ -6,23 +7,23 @@ Rectangle { Column { width: 80 height: myText.height*4 - Text { + TestText { elide: "ElideLeft" text: "aaa bbb ccc ddd eee fff" width: 80 id: myText } - Text { + TestText { elide: "ElideMiddle" text: "aaa bbb ccc ddd eee fff" width: 80 } - Text { + TestText { elide: "ElideRight" text: "aaa bbb ccc ddd eee fff" width: 80 } - Text { + TestText { elide: "ElideNone" text: "aaa bbb ccc ddd eee fff" width: 80 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml index b772982..0370a73 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml @@ -1,10 +1,11 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { width: 500 height: 100 - Text { + TestText { NumberAnimation on width { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 } elide: Text.ElideRight text: 'Here is some very long text that we should truncate when sizing window' diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml index 3ef64ef..db991a2 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { width: 500 @@ -9,7 +10,7 @@ Rectangle { height: myText.height color: "white" anchors.centerIn: parent - Text { + TestText { id: myText NumberAnimation on width { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 } elide: "ElideRight" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png Binary files differindex 89195ae..30dc0a9 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png Binary files differindex 6a48728..8d3c37b 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml index e82d80f..3a06cf0 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { id: s; width: 620; height: 600; color: "lightsteelblue" @@ -6,96 +7,96 @@ Rectangle { Column { spacing: 8 - Text { + TestText { text: s.text } - Text { + TestText { text: s.text; font.pixelSize: 18 } - Text { + TestText { text: s.text; font.pointSize: 20 } - Text { + TestText { text: s.text; color: "red"; smooth: true } - Text { + TestText { text: s.text; font.capitalization: "AllUppercase" } - Text { + TestText { text: s.text; font.underline: true } - Text { + TestText { text: s.text; font.overline: true; smooth: true } - Text { + TestText { text: s.text; font.strikeout: true } - Text { + TestText { text: s.text; font.underline: true; font.overline: true; font.strikeout: true } - Text { + TestText { text: s.text; font.letterSpacing: 2 } - Text { + TestText { text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue" } - Text { + TestText { text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green" } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white" } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray" } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow" } - Text { + TestText { text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width } - Text { + TestText { text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20 } - Text { + TestText { text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20 } Row{ height: childrenRect.height spacing: 4 - Text { + TestText { text: s.text; elide: Text.ElideLeft; width: 200 } - Text { + TestText { text: s.text; elide: Text.ElideMiddle; width: 200 } - Text { + TestText { text: s.text; elide: Text.ElideRight; width: 200 } } Row{ height: childrenRect.height spacing: 4 - Text{ + TestText{ text: s.text; elide: Text.ElideLeft; width: 200; wrapMode: Text.WordWrap } - Text { + TestText { text: s.text; elide: Text.ElideMiddle; width: 200; wrapMode: Text.WordWrap } - Text { + TestText { text: s.text; elide: Text.ElideRight; width: 200; wrapMode: Text.WordWrap } } Row{ height: childrenRect.height spacing: 4 - Text { + TestText { text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere } - Text { + TestText { text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200 } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml index 901025a..01de1f0 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext2.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { width: 400; height: 200 @@ -6,16 +7,16 @@ Rectangle { Row { spacing: 20 anchors.centerIn: parent - Text { + TestText { text: "First line\nSecond line"; wrapMode: Text.Wrap } - Text { + TestText { text: "First line\nSecond line"; width: 70 } - Text { + TestText { text: "First Second\nThird Fourth"; wrapMode: Text.Wrap; width: 50 } - Text { + TestText { text: "First line<br>Second line"; textFormat: Text.StyledText } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml index 7d174cc..3670479 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml @@ -1,4 +1,5 @@ import QtQuick 1.0 +import "../../shared" 1.0 Rectangle { id: s; width: 620; height: 600; color: "lightsteelblue" @@ -6,70 +7,70 @@ Rectangle { Column { spacing: 6 - Text { + TestText { text: s.text } - Text { + TestText { text: s.text; font.pixelSize: 18 } - Text { + TestText { text: s.text; font.pointSize: 18 } - Text { + TestText { text: s.text; color: "red"; smooth: true } - Text { + TestText { text: s.text; font.capitalization: "AllUppercase" } - Text { + TestText { text: s.text; font.underline: true } - Text { + TestText { text: s.text; font.overline: true; smooth: true } - Text { + TestText { text: s.text; font.strikeout: true } - Text { + TestText { text: s.text; font.underline: true; font.overline: true; font.strikeout: true } - Text { + TestText { text: s.text; font.letterSpacing: 2 } - Text { + TestText { text: s.text; font.underline: true; font.letterSpacing: 2; font.capitalization: "AllUppercase"; color: "blue" } - Text { + TestText { text: s.text; font.overline: true; font.wordSpacing: 25; font.capitalization: "Capitalize"; color: "green" } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white" } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Sunken; styleColor: "gray" } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Raised; styleColor: "yellow" } - Text { + TestText { text: s.text; horizontalAlignment: Text.AlignLeft; width: s.width } - Text { + TestText { text: s.text; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter; width: s.width; height: 20 } - Text { + TestText { text: s.text; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignBottom; width: s.width; height: 20 } Row{ height: childrenRect.height; spacing: 4 - Text { + TestText { text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.WrapAnywhere } - Text { + TestText { text: s.text + " thisisaverylongstringwithnospaces"; width: 150; wrapMode: Text.Wrap } - Text { + TestText { text: s.text; font.pixelSize: 18; style: Text.Outline; styleColor: "white"; wrapMode: Text.WordWrap; width: 200 } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml index 07416dc..3d5fbf0 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/qtbug_14865.qml @@ -1,9 +1,10 @@ import QtQuick 1.0 +import "../shared" 1.0 Rectangle { width: 200; height: 200 - Text { + TestText { id: label objectName: "label" text: "Hello world!" |