Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1448145 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 477
Merged at revision: 478
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1448145
Merge into: lp:ubuntu-keyboard
Diff against target: 84 lines (+52/-5)
2 files modified
src/view/abstracttexteditor.cpp (+3/-5)
tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py (+49/-0)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1448145
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
PS Jenkins bot continuous-integration Pending
Ubuntu Phablet Team Pending
Review via email: mp+297047@code.launchpad.net

Commit message

Don't send preedit events when preedit is disabled

Description of the change

Don't send preedit events when preedit is disabled

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:475
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-keyboard-ci/7/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/539
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/54
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/539
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/527
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial/527
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/523
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/523/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/523
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/523/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/523
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/523/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/523
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/523/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/523
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/523/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/523
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/523/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-keyboard-ci/7/rebuild

review: Approve (continuous-integration)
476. By Michael Sheldon

Add test for double caps in oxide

477. By Michael Sheldon

Fix flake8

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:477
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-keyboard-ci/18/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/588
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/72
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/588
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/567
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial/567
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/561
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/561
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/561
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/561
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/561
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/561
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/561/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-keyboard-ci/18/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/view/abstracttexteditor.cpp'
--- src/view/abstracttexteditor.cpp 2016-04-27 23:37:27 +0000
+++ src/view/abstracttexteditor.cpp 2016-06-14 15:13:53 +0000
@@ -428,7 +428,7 @@
428 d->word_engine->computeCandidates(d->text.data());428 d->word_engine->computeCandidates(d->text.data());
429 }429 }
430430
431 if (!d->word_engine->languageFeature()->showPrimaryInPreedit()) {431 if (!d->word_engine->languageFeature()->showPrimaryInPreedit() && d->preedit_enabled) {
432 sendPreeditString(d->text->preedit(), d->text->preeditFace(),432 sendPreeditString(d->text->preedit(), d->text->preeditFace(),
433 Replacement(d->text->cursorPosition()));433 Replacement(d->text->cursorPosition()));
434 }434 }
@@ -535,10 +535,8 @@
535535
536 if (d->word_engine->languageFeature()->commitOnSpace() || full_stop_inserted) {536 if (d->word_engine->languageFeature()->commitOnSpace() || full_stop_inserted) {
537 commitPreedit();537 commitPreedit();
538 } else {538 } else if (d->preedit_enabled) {
539 if (d->preedit_enabled) {539 d->word_engine->computeCandidates(d->text.data());
540 d->word_engine->computeCandidates(d->text.data());
541 }
542540
543 sendPreeditString(d->text->preedit(), d->text->preeditFace(),541 sendPreeditString(d->text->preedit(), d->text->preeditFace(),
544 Replacement(d->text->cursorPosition()));542 Replacement(d->text->cursorPosition()));
545543
=== modified file 'tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py'
--- tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py 2016-04-28 00:42:26 +0000
+++ tests/autopilot/ubuntu_keyboard/tests/test_keyboard.py 2016-06-14 15:13:53 +0000
@@ -1359,6 +1359,55 @@
1359 Eventually(Equals(False))1359 Eventually(Equals(False))
1360 )1360 )
13611361
1362 def test_double_caps(self):
1363 """Ensure that we switch back to lowercase after typing a letter in
1364 Oxide.
1365
1366 """
1367 qml = dedent("""
1368 import QtQuick 2.4
1369 import Ubuntu.Components 1.3
1370 import Ubuntu.Web 0.2
1371
1372 Rectangle {
1373 id: window
1374 objectName: "windowRectangle"
1375 color: "lightgrey"
1376
1377 WebView {
1378 anchors.fill: parent
1379 objectName: "webview"
1380 Component.onCompleted: {
1381 loadHtml("
1382 <html><body><textarea id='textarea'
1383 style='width: 100%; height: 100%;'></textarea>
1384 </body></html>"
1385 );
1386 }
1387 }
1388 }
1389
1390 """)
1391 gsettings = Gio.Settings.new("com.canonical.keyboard.maliit")
1392 gsettings.set_boolean("auto-capitalization", True)
1393 gsettings.set_boolean("auto-completion", False)
1394 gsettings.set_boolean("predictive-text", False)
1395 gsettings.set_boolean("spell-checking", False)
1396
1397 app = self._start_qml_script(qml)
1398 webview = app.select_single(objectName='webview')
1399
1400 self.ensure_focus_on_input(webview)
1401 keyboard = Keyboard()
1402 self.addCleanup(keyboard.dismiss)
1403
1404 keyboard.type('H')
1405
1406 self.assertThat(
1407 keyboard.active_keypad_state,
1408 Eventually(Equals(KeyPadState.NORMAL))
1409 )
1410
13621411
1363class UbuntuKeyboardPluginPaths(UbuntuKeyboardTests):1412class UbuntuKeyboardPluginPaths(UbuntuKeyboardTests):
13641413

Subscribers

People subscribed via source and target branches