Merge lp:~sil2100/ubuntu-keyboard/fix_autocap_after_newline into lp:ubuntu-keyboard

Proposed by Łukasz Zemczak
Status: Merged
Approved by: Bill Filler
Approved revision: 136
Merged at revision: 147
Proposed branch: lp:~sil2100/ubuntu-keyboard/fix_autocap_after_newline
Merge into: lp:ubuntu-keyboard
Diff against target: 27 lines (+5/-1)
2 files modified
plugins/westernsupport/westernlanguagefeatures.cpp (+1/-1)
src/view/abstracttexteditor.cpp (+4/-0)
To merge this branch: bzr merge lp:~sil2100/ubuntu-keyboard/fix_autocap_after_newline
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+205179@code.launchpad.net

Commit message

Fix auto-capitalization after a newline. This adds checks for autocapitalization for enter/return key-presses and additional autocap case characters for western languages.

Description of the change

Fix auto-capitalization after a newline

* Are there any related MPs required for this MP to build/function as expected?
No

* Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes, rebased on trunk recently

* Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes, performed basic dogfooding on mako

* Did you successfully run all tests found in your component's Test Plan on device or emulator?
Yes

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

* If you changed the packaging (debian), did you subscribe a core-dev to this MP?
Not applicable

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, all working

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/westernsupport/westernlanguagefeatures.cpp'
2--- plugins/westernsupport/westernlanguagefeatures.cpp 2013-11-28 14:40:54 +0000
3+++ plugins/westernsupport/westernlanguagefeatures.cpp 2014-03-11 12:14:31 +0000
4@@ -44,7 +44,7 @@
5
6 bool WesternLanguageFeatures::activateAutoCaps(const QString &preedit) const
7 {
8- static const QString sentenceBreak = QString::fromUtf8("!.?:");
9+ static const QString sentenceBreak = QString::fromUtf8("!.?:\r\n");
10
11 if (preedit.isEmpty()) {
12 return false;
13
14=== modified file 'src/view/abstracttexteditor.cpp'
15--- src/view/abstracttexteditor.cpp 2013-11-21 13:26:12 +0000
16+++ src/view/abstracttexteditor.cpp 2014-03-11 12:14:31 +0000
17@@ -452,6 +452,10 @@
18 case Key::ActionReturn: {
19 event_key = Qt::Key_Return;
20 keyText = QString("\r");
21+
22+ if (d->word_engine->languageFeature()->activateAutoCaps(keyText) && d->auto_caps_enabled) {
23+ Q_EMIT autoCapsActivated();
24+ }
25 } break;
26
27 case Key::ActionClose:

Subscribers

People subscribed via source and target branches