From b855240b782395f94315f43ea3e7e182299fac48 Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Thu, 16 Feb 2012 14:43:03 +1000 Subject: Rename QDeclarative symbols to QQuick and QQml Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones --- tests/auto/quick/qquicktextinput/data/Cursor.qml | 5 ++++ .../auto/quick/qquicktextinput/data/cursorTest.qml | 9 +++++++ .../qquicktextinput/data/cursorTestExternal.qml | 15 +++++++++++ .../qquicktextinput/data/cursorTestInline.qml | 15 +++++++++++ .../quick/qquicktextinput/data/cursorVisible.qml | 6 +++++ tests/auto/quick/qquicktextinput/data/echoMode.qml | 11 ++++++++ .../quick/qquicktextinput/data/geometrySignals.qml | 12 +++++++++ .../quick/qquicktextinput/data/halign_center.png | Bin 0 -> 293 bytes .../quick/qquicktextinput/data/halign_left.png | Bin 0 -> 291 bytes .../quick/qquicktextinput/data/halign_right.png | Bin 0 -> 292 bytes .../qquicktextinput/data/horizontalAlignment.qml | 23 ++++++++++++++++ .../data/horizontalAlignment_RightToLeft.qml | 24 +++++++++++++++++ .../quick/qquicktextinput/data/inputContext.qml | 8 ++++++ .../qquicktextinput/data/inputMethodEvent.qml | 6 +++++ .../quick/qquicktextinput/data/inputmethods.qml | 7 +++++ tests/auto/quick/qquicktextinput/data/masks.qml | 7 +++++ .../auto/quick/qquicktextinput/data/maxLength.qml | 7 +++++ .../qquicktextinput/data/mouseselection_true.qml | 7 +++++ .../data/mouseselectionmode_characters.qml | 8 ++++++ .../data/mouseselectionmode_default.qml | 7 +++++ .../data/mouseselectionmode_words.qml | 8 ++++++ .../auto/quick/qquicktextinput/data/navigation.qml | 24 +++++++++++++++++ .../qquicktextinput/data/negativeDimensions.qml | 19 ++++++++++++++ .../quick/qquicktextinput/data/openInputPanel.qml | 7 +++++ .../qquicktextinput/data/persistentSelection.qml | 8 ++++++ .../auto/quick/qquicktextinput/data/positionAt.qml | 9 +++++++ .../qquicktextinput/data/preeditAutoScroll.qml | 7 +++++ .../qquicktextinput/data/qtbug-19956double.qml | 15 +++++++++++ .../quick/qquicktextinput/data/qtbug-19956int.qml | 15 +++++++++++ .../qquicktextinput/data/qtbug-19956regexp.qml | 13 +++++++++ tests/auto/quick/qquicktextinput/data/readOnly.qml | 12 +++++++++ .../auto/quick/qquicktextinput/data/validators.qml | 29 +++++++++++++++++++++ 32 files changed, 343 insertions(+) create mode 100644 tests/auto/quick/qquicktextinput/data/Cursor.qml create mode 100644 tests/auto/quick/qquicktextinput/data/cursorTest.qml create mode 100644 tests/auto/quick/qquicktextinput/data/cursorTestExternal.qml create mode 100644 tests/auto/quick/qquicktextinput/data/cursorTestInline.qml create mode 100644 tests/auto/quick/qquicktextinput/data/cursorVisible.qml create mode 100644 tests/auto/quick/qquicktextinput/data/echoMode.qml create mode 100644 tests/auto/quick/qquicktextinput/data/geometrySignals.qml create mode 100644 tests/auto/quick/qquicktextinput/data/halign_center.png create mode 100644 tests/auto/quick/qquicktextinput/data/halign_left.png create mode 100644 tests/auto/quick/qquicktextinput/data/halign_right.png create mode 100644 tests/auto/quick/qquicktextinput/data/horizontalAlignment.qml create mode 100644 tests/auto/quick/qquicktextinput/data/horizontalAlignment_RightToLeft.qml create mode 100644 tests/auto/quick/qquicktextinput/data/inputContext.qml create mode 100644 tests/auto/quick/qquicktextinput/data/inputMethodEvent.qml create mode 100644 tests/auto/quick/qquicktextinput/data/inputmethods.qml create mode 100644 tests/auto/quick/qquicktextinput/data/masks.qml create mode 100644 tests/auto/quick/qquicktextinput/data/maxLength.qml create mode 100644 tests/auto/quick/qquicktextinput/data/mouseselection_true.qml create mode 100644 tests/auto/quick/qquicktextinput/data/mouseselectionmode_characters.qml create mode 100644 tests/auto/quick/qquicktextinput/data/mouseselectionmode_default.qml create mode 100644 tests/auto/quick/qquicktextinput/data/mouseselectionmode_words.qml create mode 100644 tests/auto/quick/qquicktextinput/data/navigation.qml create mode 100644 tests/auto/quick/qquicktextinput/data/negativeDimensions.qml create mode 100644 tests/auto/quick/qquicktextinput/data/openInputPanel.qml create mode 100644 tests/auto/quick/qquicktextinput/data/persistentSelection.qml create mode 100644 tests/auto/quick/qquicktextinput/data/positionAt.qml create mode 100644 tests/auto/quick/qquicktextinput/data/preeditAutoScroll.qml create mode 100644 tests/auto/quick/qquicktextinput/data/qtbug-19956double.qml create mode 100644 tests/auto/quick/qquicktextinput/data/qtbug-19956int.qml create mode 100644 tests/auto/quick/qquicktextinput/data/qtbug-19956regexp.qml create mode 100644 tests/auto/quick/qquicktextinput/data/readOnly.qml create mode 100644 tests/auto/quick/qquicktextinput/data/validators.qml (limited to 'tests/auto/quick/qquicktextinput/data') diff --git a/tests/auto/quick/qquicktextinput/data/Cursor.qml b/tests/auto/quick/qquicktextinput/data/Cursor.qml new file mode 100644 index 0000000000..e5c1853fc5 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/Cursor.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Rectangle { + property string localProperty +} diff --git a/tests/auto/quick/qquicktextinput/data/cursorTest.qml b/tests/auto/quick/qquicktextinput/data/cursorTest.qml new file mode 100644 index 0000000000..71a420ee7c --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/cursorTest.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +Rectangle { id:rect; width: 300; height: 300; color: "white" + property string contextualProperty: "Hello" + TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject" + resources: [ Component { id:cursor; Item { id:cursorInstance; objectName: "cursorInstance"; property string localProperty: contextualProperty } } ] + cursorDelegate: cursor + } +} diff --git a/tests/auto/quick/qquicktextinput/data/cursorTestExternal.qml b/tests/auto/quick/qquicktextinput/data/cursorTestExternal.qml new file mode 100644 index 0000000000..9277dcc518 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/cursorTestExternal.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Rectangle { width: 300; height: 300; color: "white" + property string contextualProperty: "Hello" + TextInput { + text: "Hello world!" + id: textInputObject; + objectName: "textInputObject" + cursorDelegate: Cursor { + id:cursorInstance; + objectName: "cursorInstance"; + localProperty: contextualProperty; + } + } +} diff --git a/tests/auto/quick/qquicktextinput/data/cursorTestInline.qml b/tests/auto/quick/qquicktextinput/data/cursorTestInline.qml new file mode 100644 index 0000000000..efc4b191da --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/cursorTestInline.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Rectangle { width: 300; height: 300; color: "white" + property string contextualProperty: "Hello" + TextInput { + text: "Hello world!" + id: textInputObject + objectName: "textInputObject" + cursorDelegate: Item { + id:cursorInstance + objectName: "cursorInstance" + property string localProperty: contextualProperty + } + } +} diff --git a/tests/auto/quick/qquicktextinput/data/cursorVisible.qml b/tests/auto/quick/qquicktextinput/data/cursorVisible.qml new file mode 100644 index 0000000000..49e9386947 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/cursorVisible.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Item { + width: 100 + height: 20 +} diff --git a/tests/auto/quick/qquicktextinput/data/echoMode.qml b/tests/auto/quick/qquicktextinput/data/echoMode.qml new file mode 100644 index 0000000000..f8a6cf1c89 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/echoMode.qml @@ -0,0 +1,11 @@ +import QtQuick 2.0 + +Rectangle { + property QtObject myInput: input + + width: 400; height: 200; color: "green" + + TextInput { id: input; focus: true + text: "ABCDefgh" + } +} diff --git a/tests/auto/quick/qquicktextinput/data/geometrySignals.qml b/tests/auto/quick/qquicktextinput/data/geometrySignals.qml new file mode 100644 index 0000000000..90855a61cf --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/geometrySignals.qml @@ -0,0 +1,12 @@ +import QtQuick 2.0 + +Item { + width: 400; height: 500; + property int bindingWidth: text.width + property int bindingHeight: text.height + + TextEdit { + id: text + anchors.fill: parent + } +} diff --git a/tests/auto/quick/qquicktextinput/data/halign_center.png b/tests/auto/quick/qquicktextinput/data/halign_center.png new file mode 100644 index 0000000000..53e09a8e5b Binary files /dev/null and b/tests/auto/quick/qquicktextinput/data/halign_center.png differ diff --git a/tests/auto/quick/qquicktextinput/data/halign_left.png b/tests/auto/quick/qquicktextinput/data/halign_left.png new file mode 100644 index 0000000000..247acbc9df Binary files /dev/null and b/tests/auto/quick/qquicktextinput/data/halign_left.png differ diff --git a/tests/auto/quick/qquicktextinput/data/halign_right.png b/tests/auto/quick/qquicktextinput/data/halign_right.png new file mode 100644 index 0000000000..691bc75c89 Binary files /dev/null and b/tests/auto/quick/qquicktextinput/data/halign_right.png differ diff --git a/tests/auto/quick/qquicktextinput/data/horizontalAlignment.qml b/tests/auto/quick/qquicktextinput/data/horizontalAlignment.qml new file mode 100644 index 0000000000..89934532e3 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/horizontalAlignment.qml @@ -0,0 +1,23 @@ +import QtQuick 2.0 + +Rectangle { + id: top + width: 70; height: 70; + + property alias horizontalAlignment: text.horizontalAlignment + property string text: "Test" + + Rectangle { + anchors.centerIn: parent + width: 60 + height: 60 + color: "green" + + TextInput { + objectName: "text" + id: text + anchors.fill: parent + text: top.text + } + } +} diff --git a/tests/auto/quick/qquicktextinput/data/horizontalAlignment_RightToLeft.qml b/tests/auto/quick/qquicktextinput/data/horizontalAlignment_RightToLeft.qml new file mode 100644 index 0000000000..5f88025536 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/horizontalAlignment_RightToLeft.qml @@ -0,0 +1,24 @@ +import QtQuick 2.0 + +Rectangle { + id: top + width: 200; height: 70; + + property alias horizontalAlignment: text.horizontalAlignment + property string text: "اختبا" + + Rectangle { + anchors.centerIn: parent + width: 180 + height: 20 + color: "green" + + TextInput { + id: text + objectName: "text" + anchors.fill: parent + text: top.text + focus: true + } + } +} diff --git a/tests/auto/quick/qquicktextinput/data/inputContext.qml b/tests/auto/quick/qquicktextinput/data/inputContext.qml new file mode 100644 index 0000000000..dfc80990c6 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/inputContext.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +TextInput { + width: 200 + text: "supercalifra" + focus: true + cursorPosition: 12 +} diff --git a/tests/auto/quick/qquicktextinput/data/inputMethodEvent.qml b/tests/auto/quick/qquicktextinput/data/inputMethodEvent.qml new file mode 100644 index 0000000000..7aefdf28f4 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/inputMethodEvent.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +TextInput { + focus: true + autoScroll: false +} diff --git a/tests/auto/quick/qquicktextinput/data/inputmethods.qml b/tests/auto/quick/qquicktextinput/data/inputmethods.qml new file mode 100644 index 0000000000..711e89144c --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/inputmethods.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput { + text: "Hello world!" + inputMethodHints: Qt.ImhNoPredictiveText + Keys.onLeftPressed: {} +} diff --git a/tests/auto/quick/qquicktextinput/data/masks.qml b/tests/auto/quick/qquicktextinput/data/masks.qml new file mode 100644 index 0000000000..589b6a3c15 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/masks.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput{ + focus: true + objectName: "myInput" + inputMask: "HHHHhhhh; " +} diff --git a/tests/auto/quick/qquicktextinput/data/maxLength.qml b/tests/auto/quick/qquicktextinput/data/maxLength.qml new file mode 100644 index 0000000000..cca537ed6b --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/maxLength.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput{ + focus: true + objectName: "myInput" + maximumLength: 10 +} diff --git a/tests/auto/quick/qquicktextinput/data/mouseselection_true.qml b/tests/auto/quick/qquicktextinput/data/mouseselection_true.qml new file mode 100644 index 0000000000..974041b04a --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/mouseselection_true.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput { + focus: true + text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + selectByMouse: true +} diff --git a/tests/auto/quick/qquicktextinput/data/mouseselectionmode_characters.qml b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_characters.qml new file mode 100644 index 0000000000..f7c658b618 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_characters.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +TextInput { + focus: true + text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + selectByMouse: true + mouseSelectionMode: TextInput.SelectCharacters +} diff --git a/tests/auto/quick/qquicktextinput/data/mouseselectionmode_default.qml b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_default.qml new file mode 100644 index 0000000000..974041b04a --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_default.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput { + focus: true + text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + selectByMouse: true +} diff --git a/tests/auto/quick/qquicktextinput/data/mouseselectionmode_words.qml b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_words.qml new file mode 100644 index 0000000000..20e777e470 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/mouseselectionmode_words.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +TextInput { + focus: true + text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + selectByMouse: true + mouseSelectionMode: TextInput.SelectWords +} diff --git a/tests/auto/quick/qquicktextinput/data/navigation.qml b/tests/auto/quick/qquicktextinput/data/navigation.qml new file mode 100644 index 0000000000..3a7d07b3c7 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/navigation.qml @@ -0,0 +1,24 @@ +import QtQuick 2.0 + +Rectangle { + property variant myInput: input + + width: 800; height: 600; color: "blue" + + Item { + id: firstItem; + KeyNavigation.right: input + } + + TextInput { id: input; focus: true + text: "Needs some text" + KeyNavigation.left: firstItem + KeyNavigation.right: lastItem + KeyNavigation.up: firstItem + KeyNavigation.down: lastItem + } + Item { + id: lastItem + KeyNavigation.left: input + } +} diff --git a/tests/auto/quick/qquicktextinput/data/negativeDimensions.qml b/tests/auto/quick/qquicktextinput/data/negativeDimensions.qml new file mode 100644 index 0000000000..7a58c85b1d --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/negativeDimensions.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 + +Item { + TextInput { + objectName: "input" + + focus: true + width: -1 + height: -1 + text: "sushi" + + anchors { + left: parent.left; + leftMargin: 5 + top: parent.top + topMargin: font.pixelSize + } + } +} diff --git a/tests/auto/quick/qquicktextinput/data/openInputPanel.qml b/tests/auto/quick/qquicktextinput/data/openInputPanel.qml new file mode 100644 index 0000000000..ca5cb263aa --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/openInputPanel.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput { + width: 100; height: 100 + text: "Hello world" + focus: false +} diff --git a/tests/auto/quick/qquicktextinput/data/persistentSelection.qml b/tests/auto/quick/qquicktextinput/data/persistentSelection.qml new file mode 100644 index 0000000000..dea6e48b08 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/persistentSelection.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +TextInput { + property string selected: selectedText + + text: "Hello World!" + focus: true +} diff --git a/tests/auto/quick/qquicktextinput/data/positionAt.qml b/tests/auto/quick/qquicktextinput/data/positionAt.qml new file mode 100644 index 0000000000..edb4744107 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/positionAt.qml @@ -0,0 +1,9 @@ +import QtQuick 2.0 + +TextInput{ + focus: true + objectName: "myInput" + width: 50 + height: 100 + text: "AAAAAAAAAAAAAAAAAAAAAAAAAAAA" +} diff --git a/tests/auto/quick/qquicktextinput/data/preeditAutoScroll.qml b/tests/auto/quick/qquicktextinput/data/preeditAutoScroll.qml new file mode 100644 index 0000000000..9d98a2e220 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/preeditAutoScroll.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +TextInput { + focus: true + text: "super" + autoScroll: true +} diff --git a/tests/auto/quick/qquicktextinput/data/qtbug-19956double.qml b/tests/auto/quick/qquicktextinput/data/qtbug-19956double.qml new file mode 100644 index 0000000000..e9b80fceb2 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/qtbug-19956double.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +TextInput { + id: textinput + property real topvalue: 30 + property real bottomvalue: 10 + height: 50 + width: 200 + text: "20" + validator: DoubleValidator { + id: doublevalidator + bottom: bottomvalue + top: topvalue + } +} diff --git a/tests/auto/quick/qquicktextinput/data/qtbug-19956int.qml b/tests/auto/quick/qquicktextinput/data/qtbug-19956int.qml new file mode 100644 index 0000000000..0d70eedb80 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/qtbug-19956int.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +TextInput { + id: textinput + property real topvalue: 30 + property real bottomvalue: 10 + height: 50 + width: 200 + text: "20" + validator: IntValidator { + id: intvalidator + bottom: bottomvalue + top: topvalue + } +} diff --git a/tests/auto/quick/qquicktextinput/data/qtbug-19956regexp.qml b/tests/auto/quick/qquicktextinput/data/qtbug-19956regexp.qml new file mode 100644 index 0000000000..b5af13cc4c --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/qtbug-19956regexp.qml @@ -0,0 +1,13 @@ +import QtQuick 2.0 + +TextInput { + id: textinput + property variant regexvalue + height: 50 + width: 200 + text: "abc" + validator: RegExpValidator { + id: regexpvalidator + regExp: regexvalue + } +} diff --git a/tests/auto/quick/qquicktextinput/data/readOnly.qml b/tests/auto/quick/qquicktextinput/data/readOnly.qml new file mode 100644 index 0000000000..9cda7fbd1d --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/readOnly.qml @@ -0,0 +1,12 @@ +import QtQuick 2.0 + +Rectangle { + property variant myInput: input + + width: 800; height: 600; color: "blue" + + TextInput { id: input; focus: true + readOnly: true + text: "I am the very model of a modern major general.\n" + } +} diff --git a/tests/auto/quick/qquicktextinput/data/validators.qml b/tests/auto/quick/qquicktextinput/data/validators.qml new file mode 100644 index 0000000000..0ba87e0592 --- /dev/null +++ b/tests/auto/quick/qquicktextinput/data/validators.qml @@ -0,0 +1,29 @@ +import QtQuick 2.0 + +Item { + property variant intInput: intInput + property variant dblInput: dblInput + property variant strInput: strInput + property variant unvalidatedInput: unvalidatedInput + + width: 800; height: 600; + + Column{ + TextInput { id: intInput; + property bool acceptable: acceptableInput + validator: IntValidator{top: 11; bottom: 2} + } + TextInput { id: dblInput; + property bool acceptable: acceptableInput + validator: DoubleValidator{top: 12.12; bottom: 2.93; decimals: 2; notation: DoubleValidator.StandardNotation} + } + TextInput { id: strInput; + property bool acceptable: acceptableInput + validator: RegExpValidator { regExp: /[a-zA-z]{2,4}/ } + } + TextInput { id: unvalidatedInput + property bool acceptable: acceptableInput + } + } + +} -- cgit v1.2.3