Merge lp:~michael-sheldon/ubuntu-keyboard/fix-autocaps-on-delete into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 230
Merged at revision: 229
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-autocaps-on-delete
Merge into: lp:ubuntu-keyboard
Diff against target: 52 lines (+7/-4)
3 files modified
qml/keys/CharKey.qml (+4/-2)
src/plugin/inputmethod.cpp (+2/-1)
src/view/abstracttexteditor.cpp (+1/-1)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-autocaps-on-delete
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+235980@code.launchpad.net

Commit message

Disable autocaps when the user deletes beyond a full stop character.

Description of the change

Disable autocaps when the user deletes beyond a full stop character.

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/<package-name>) on device or emulator?
yes

Did CI run pass? If not, please explain why.
yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/keys/CharKey.qml'
2--- qml/keys/CharKey.qml 2014-09-16 12:39:01 +0000
3+++ qml/keys/CharKey.qml 2014-09-25 15:25:14 +0000
4@@ -209,7 +209,7 @@
5 magnifier.shown = false;
6 }
7
8- if (panel.autoCapsTriggered) {
9+ if (panel.autoCapsTriggered && action != "backspace") {
10 panel.autoCapsTriggered = false;
11 }
12 else if (!skipAutoCaps) {
13@@ -243,7 +243,9 @@
14 pressEffect.start();
15
16 // Quick workaround to fix initial autocaps - not beautiful, but works
17- panel.autoCapsTriggered = false;
18+ if(action != "backspace") {
19+ panel.autoCapsTriggered = false;
20+ }
21 event_handler.onKeyPressed(valueToSubmit, action);
22 }
23
24
25=== modified file 'src/plugin/inputmethod.cpp'
26--- src/plugin/inputmethod.cpp 2014-09-10 14:57:52 +0000
27+++ src/plugin/inputmethod.cpp 2014-09-25 15:25:14 +0000
28@@ -422,9 +422,10 @@
29 QString text;
30 int position;
31 bool ok = d->host->surroundingText(text, position);
32+ QString textOnLeft = (d->editor.text()->surroundingLeft() + d->editor.text()->preedit()).trimmed();
33 if (ok && text.isEmpty() && d->editor.text()->preedit().isEmpty() && position == 0) {
34 Q_EMIT activateAutocaps();
35- } else {
36+ } else if (!d->editor.wordEngine()->languageFeature()->activateAutoCaps(textOnLeft)) {
37 // Clear autocaps if it has been set by us previously being in an
38 // empty field
39 Q_EMIT deactivateAutocaps();
40
41=== modified file 'src/view/abstracttexteditor.cpp'
42--- src/view/abstracttexteditor.cpp 2014-09-22 12:43:09 +0000
43+++ src/view/abstracttexteditor.cpp 2014-09-25 15:25:14 +0000
44@@ -938,7 +938,7 @@
45 if (d->auto_caps_enabled) {
46 if (auto_caps_activated) {
47 Q_EMIT autoCapsActivated();
48- } else {
49+ } else if(!textOnLeft.isEmpty()) {
50 Q_EMIT autoCapsDeactivated();
51 }
52 }

Subscribers

People subscribed via source and target branches