diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2018-08-21 12:24:35 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2018-08-27 12:43:11 +0000 |
commit | d16972ea958dcf47e9ccd8255d0d83861ba01aae (patch) | |
tree | 1216a6650ac1fba474ee06fe53521cff46576026 /tests/auto/inputpanel/data/inputpanel | |
parent | 334116f863bd548532b51ed6f8d71617500fd7b0 (diff) |
Trim InputContext API
The purpose of this change is to reduce the number of public API in the
virtual keyboard.
This change moves a lot of stuff from InputContext to ShiftHandler and
InputContextPrivate and exposes the private API to QML through
InputContext.priv property.
Almost all the unrelevant APIs were moved away, except some properties
and methods needed by selection control. These were left intact because
moving them is not trivial.
Change-Id: I1f23f5f54bc21c68996cb220a66d16d34b5d14ce
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'tests/auto/inputpanel/data/inputpanel')
-rw-r--r-- | tests/auto/inputpanel/data/inputpanel/inputpanel.qml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml index c3682b8a..01fc2ede 100644 --- a/tests/auto/inputpanel/data/inputpanel/inputpanel.qml +++ b/tests/auto/inputpanel/data/inputpanel/inputpanel.qml @@ -47,8 +47,8 @@ InputPanel { readonly property int cursorPosition: InputContext.cursorPosition readonly property string preeditText: InputContext.preeditText readonly property string surroundingText: InputContext.surroundingText - readonly property bool autoCapitalizationEnabled: InputContext.shiftHandler.autoCapitalizationEnabled - readonly property bool toggleShiftEnabled: InputContext.shiftHandler.toggleShiftEnabled + readonly property bool autoCapitalizationEnabled: InputContext.priv.shiftHandler.autoCapitalizationEnabled + readonly property bool toggleShiftEnabled: InputContext.priv.shiftHandler.toggleShiftEnabled readonly property string locale: keyboard.locale readonly property string defaultLocale: VirtualKeyboardSettings.locale readonly property var availableLocales: VirtualKeyboardSettings.availableLocales @@ -384,12 +384,12 @@ InputPanel { } else if (typeof key != "number" || key !== Qt.Key_Shift) { // Some layouts (such as Arabic, Hindi) may have a second layout virtualKeyClick(Qt.Key_Shift) - InputContext.shiftHandler.clearToggleShiftTimer() + InputContext.priv.shiftHandler.clearToggleShiftTimer() testcase.waitForRendering(inputPanel) success = keyActionOnCurrentLayoutCb(key) if (!success) { virtualKeyClick(Qt.Key_Shift) - InputContext.shiftHandler.clearToggleShiftTimer() + InputContext.priv.shiftHandler.clearToggleShiftTimer() testcase.waitForRendering(inputPanel) } } @@ -534,15 +534,15 @@ InputPanel { } function toggleShift() { - InputContext.shiftHandler.toggleShift() + InputContext.priv.shiftHandler.toggleShift() } function setShift(shift) { - InputContext.shift = shift + InputContext.priv.shiftHandler.shift = shift } function setCapsLock(capsLock) { - InputContext.capsLock = capsLock + InputContext.priv.shiftHandler.capsLock = capsLock } function style() { |