summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml')
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml
new file mode 100644
index 00000000..aca7c2dd
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/bugs/QTBUG-14469.qml
@@ -0,0 +1,23 @@
+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.
+ Test passes if it goes from "" to 13 back to "" with all numbers being painted (and the text disappearing at 0)
+ */
+
+Item{
+ width: 80
+ height: 80
+ property int val: 0
+ Text{
+ id: txt;
+ text: val == 0 ? "" : val
+ }
+ Timer{
+ interval: 100
+ running: true
+ repeat: true;
+ onTriggered: {val = (val + 1) % 14;}
+ }
+}