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/shared | |
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/shared')
-rw-r--r-- | tests/auto/declarative/qmlvisual/shared/README | 7 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/shared/TestText.qml | 8 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml | 14 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/shared/TestTextInput.qml | 14 | ||||
-rw-r--r-- | tests/auto/declarative/qmlvisual/shared/Vera.ttf | bin | 0 -> 65932 bytes | |||
-rw-r--r-- | tests/auto/declarative/qmlvisual/shared/qmldir | 3 |
6 files changed, 46 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/shared/README b/tests/auto/declarative/qmlvisual/shared/README new file mode 100644 index 0000000..56a88ae --- /dev/null +++ b/tests/auto/declarative/qmlvisual/shared/README @@ -0,0 +1,7 @@ +These components provide a standard set of what would otherwise be system dependant settings. These are +-default font +-default fontSize +-cursor blink time (unblinking cursor) + +This should probably be replaced with a Test Style/Theme once QtComponents is done. +Note that having multiple font loaders is probably quite inefficient, so don't use these for performance tests. diff --git a/tests/auto/declarative/qmlvisual/shared/TestText.qml b/tests/auto/declarative/qmlvisual/shared/TestText.qml new file mode 100644 index 0000000..be40112 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/shared/TestText.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import "../shared" 1.0 + +Text{ + FontLoader { id: fixedFont; source: "Vera.ttf" } + font.family: fixedFont.name + font.pixelSize: 12 +} diff --git a/tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml b/tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml new file mode 100644 index 0000000..fb35ae3 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml @@ -0,0 +1,14 @@ +import QtQuick 1.0 +import "../shared" 1.0 + +TextEdit { + id: edit + FontLoader { id: fixedFont; source: "Vera.ttf" } + font.family: fixedFont.name + font.pixelSize: 12 + cursorDelegate: Rectangle { + width: 1; + color: "black"; + visible: edit.cursorVisible + } +} diff --git a/tests/auto/declarative/qmlvisual/shared/TestTextInput.qml b/tests/auto/declarative/qmlvisual/shared/TestTextInput.qml new file mode 100644 index 0000000..8593218 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/shared/TestTextInput.qml @@ -0,0 +1,14 @@ +import QtQuick 1.0 +import "../shared" 1.0 + +TextInput { + id: inp + FontLoader { id: fixedFont; source: "Vera.ttf" } + font.family: fixedFont.name + font.pixelSize: 12 + cursorDelegate: Rectangle { + width: 1; + color: "black"; + visible: parent.cursorVisible//bug that 'inp' doesn't seem to work? + } +} diff --git a/tests/auto/declarative/qmlvisual/shared/Vera.ttf b/tests/auto/declarative/qmlvisual/shared/Vera.ttf Binary files differnew file mode 100644 index 0000000..58cd6b5 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/shared/Vera.ttf diff --git a/tests/auto/declarative/qmlvisual/shared/qmldir b/tests/auto/declarative/qmlvisual/shared/qmldir new file mode 100644 index 0000000..4aebb39 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/shared/qmldir @@ -0,0 +1,3 @@ +TestText 1.0 TestText.qml +TestTextEdit 1.0 TestTextEdit.qml +TestTextInput 1.0 TestTextInput.qml |