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
=== modified file 'plugins/westernsupport/westernlanguagefeatures.cpp'
--- plugins/westernsupport/westernlanguagefeatures.cpp 2013-11-28 14:40:54 +0000
+++ plugins/westernsupport/westernlanguagefeatures.cpp 2014-03-11 12:14:31 +0000
@@ -44,7 +44,7 @@
4444
45bool WesternLanguageFeatures::activateAutoCaps(const QString &preedit) const45bool WesternLanguageFeatures::activateAutoCaps(const QString &preedit) const
46{46{
47 static const QString sentenceBreak = QString::fromUtf8("!.?:");47 static const QString sentenceBreak = QString::fromUtf8("!.?:\r\n");
4848
49 if (preedit.isEmpty()) {49 if (preedit.isEmpty()) {
50 return false;50 return false;
5151
=== modified file 'src/view/abstracttexteditor.cpp'
--- src/view/abstracttexteditor.cpp 2013-11-21 13:26:12 +0000
+++ src/view/abstracttexteditor.cpp 2014-03-11 12:14:31 +0000
@@ -452,6 +452,10 @@
452 case Key::ActionReturn: {452 case Key::ActionReturn: {
453 event_key = Qt::Key_Return;453 event_key = Qt::Key_Return;
454 keyText = QString("\r");454 keyText = QString("\r");
455
456 if (d->word_engine->languageFeature()->activateAutoCaps(keyText) && d->auto_caps_enabled) {
457 Q_EMIT autoCapsActivated();
458 }
455 } break;459 } break;
456460
457 case Key::ActionClose:461 case Key::ActionClose:

Subscribers

People subscribed via source and target branches