Merge lp:~lukas-kde/unity8/pinLockHWKeyboard into lp:unity8

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 2213
Merged at revision: 2264
Proposed branch: lp:~lukas-kde/unity8/pinLockHWKeyboard
Merge into: lp:unity8
Diff against target: 359 lines (+139/-112)
5 files modified
qml/Components/Lockscreen.qml (+86/-100)
qml/Components/PassphraseLockscreen.qml (+5/-4)
qml/Components/PinLockscreen.qml (+22/-1)
qml/Greeter/NarrowView.qml (+12/-0)
tests/qmltests/Components/tst_Lockscreen.qml (+14/-7)
To merge this branch: bzr merge lp:~lukas-kde/unity8/pinLockHWKeyboard
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+287327@code.launchpad.net

Commit message

Enable the PIN lockscreen to be used with a HW keyboard

Description of the change

Enable the PIN lockscreen to be used with a HW keyboard

Also clean up focus related issues byt turning everything into a chain of FocusScopes without manually forcing it.

Checklist:

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

No

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

 * Did you make sure that your branch does not contain spurious tags?

Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

 * If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
2208. By Lukáš Tinkl

fix failing tests due to missing focus

2209. By Lukáš Tinkl

modified the unlock() test for the HW keyboard case

2210. By Lukáš Tinkl

also handle Enter/Return keys

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2207
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/507/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/671
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/694
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/712
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/712
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/708
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/708/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/708
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/708/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/708
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/708/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/708
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/708/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/708
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/708/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/708
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/708/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/507/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2207
http://jenkins.qa.ubuntu.com/job/unity8-ci/7434/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6667
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/849/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/2139
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/842/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/2034
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/2034
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/841
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/840
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/5061
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6678
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6678/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27937
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/446/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/847
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/847/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27936

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7434/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2207
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/509/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/673
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/244
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/244
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay/246/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=xenial/246/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/696
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/713
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/713
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/709
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/709/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/709
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/709/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/709
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/709/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/709
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/709/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/709
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/709/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/709
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/709/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/509/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2210
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/510/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/674
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/248
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/248
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay/249
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=xenial/249/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/697
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/715
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/715
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/711
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/711/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/711
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/711/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/711
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/711/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/711
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/711/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/711
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/711/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/711
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/711/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/510/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2210
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/511/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/675
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/251
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/251
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay/252/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/698
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/716
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/716
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/712
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/712/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/712
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/712/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/712
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/712/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/712
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/712/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/712
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/712/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/712
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/712/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/511/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2210
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/512/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/676
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/253
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/253
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay/254/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/699
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/717
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/717
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/713
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/713/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/713
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/713/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/713
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/713/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/713
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/713/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/713
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/713/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/713
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/713/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/512/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2210
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/513/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/677
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/255
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/255
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay/257
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/700
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/718
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/718
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/714
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/714/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/714
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/714/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/714
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/714/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/714
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/714/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/714
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/714/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/714
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/714/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/513/rebuild

review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

On the pin lock screen i first have to press some of the "on screen" 1, 2, 3, etc for the keyboard presses to be detected, otherwise if i just swipe greeter and press keys they are not detected.

review: Needs Fixing
2211. By Lukáš Tinkl

fix focus when coming from greeter

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

> On the pin lock screen i first have to press some of the "on screen" 1, 2, 3,
> etc for the keyboard presses to be detected, otherwise if i just swipe greeter
> and press keys they are not detected.

Fixed

Revision history for this message
Albert Astals Cid (aacid) wrote :

I think we should disable they keyboard input the same moment we disable the buttons, i.e. pressing the buttons is impossible i never enter more than 4 numbers, with the keyboard i can get 5 "dots" on screen that can be somehow confusing.

What do you think?

review: Needs Fixing
2212. By Lukáš Tinkl

return early to prevent accepting key presses past the max length

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

> I think we should disable they keyboard input the same moment we disable the
> buttons, i.e. pressing the buttons is impossible i never enter more than 4
> numbers, with the keyboard i can get 5 "dots" on screen that can be somehow
> confusing.
>
> What do you think?

Yup, that makes sense, added a check for the max length

Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks nice :)

One minor nitpick

} else if (event.key === Qt.Key_Delete) {
    closeButton.clicked()

I don't mind if you keep "Del" being close, but can we add "Esc" too?

review: Needs Information
2213. By Lukáš Tinkl

close also on Esc

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

> Looks nice :)
>
> One minor nitpick
>
> } else if (event.key === Qt.Key_Delete) {
> closeButton.clicked()
>
> I don't mind if you keep "Del" being close, but can we add "Esc" too?

Done :)

Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass? If not, please explain why.
CI is sleeping, ran locally and passed

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2212
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/551/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/305
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial,testname=qmluitests.sh/305
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=autopilot.sh/305
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/740
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/757
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/757
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/753
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/753/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/753
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/753/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/753
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/753/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/753
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/753/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/753
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/753/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/753
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/753/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/551/rebuild

review: Approve (continuous-integration)
2214. By Lukáš Tinkl

merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Components/Lockscreen.qml'
2--- qml/Components/Lockscreen.qml 2015-07-15 15:07:19 +0000
3+++ qml/Components/Lockscreen.qml 2016-03-05 10:19:12 +0000
4@@ -121,107 +121,93 @@
5 opacity: root.darkenBackground
6 }
7
8- MouseArea {
9- anchors.fill: root
10- onClicked: {
11- if (pinPadLoader.item)
12- pinPadLoader.item.forceActiveFocus()
13- }
14- }
15-
16- FocusScope {
17- id: loaderScope
18+ Loader {
19+ id: pinPadLoader
20+ objectName: "pinPadLoader"
21 anchors.fill: parent
22-
23- Loader {
24- id: pinPadLoader
25- objectName: "pinPadLoader"
26- anchors.fill: parent
27- property bool resetting: false
28- property bool waiting: false
29- property bool showWrongText: false
30-
31- source: {
32- if (resetting || !root.required) {
33- return ""
34- } else if (root.delayMinutes > 0) {
35- return "DelayedLockscreen.qml"
36- } else if (root.alphaNumeric) {
37- return "PassphraseLockscreen.qml"
38- } else {
39- return "PinLockscreen.qml"
40- }
41- }
42- onSourceChanged: {
43- waiting = false
44- showWrongText = false
45- if (loaderScope.activeFocus && pinPadLoader.item)
46- pinPadLoader.item.forceActiveFocus()
47- }
48-
49- Connections {
50- target: pinPadLoader.item
51-
52- onEntered: {
53- pinPadLoader.waiting = true
54- root.entered(passphrase);
55- }
56-
57- onCancel: {
58- root.cancel()
59- }
60- }
61-
62- Binding {
63- target: pinPadLoader.item
64- property: "minPinLength"
65- value: root.minPinLength
66- }
67- Binding {
68- target: pinPadLoader.item
69- property: "maxPinLength"
70- value: root.maxPinLength
71- }
72- Binding {
73- target: pinPadLoader.item
74- property: "infoText"
75- value: root.infoText
76- }
77- Binding {
78- target: pinPadLoader.item
79- property: "retryText"
80- value: root.retryText
81- }
82- Binding {
83- target: pinPadLoader.item
84- property: "errorText"
85- value: pinPadLoader.showWrongText ? root.errorText : ""
86- }
87- Binding {
88- target: pinPadLoader.item
89- property: "entryEnabled"
90- value: !pinPadLoader.waiting
91- }
92- Binding {
93- target: pinPadLoader.item
94- property: "alphaNumeric"
95- value: root.alphaNumeric
96- }
97- Binding {
98- target: pinPadLoader.item
99- property: "delayMinutes"
100- value: root.delayMinutes
101- }
102- Binding {
103- target: pinPadLoader.item
104- property: "showCancelButton"
105- value: root.showCancelButton
106- }
107- Binding {
108- target: pinPadLoader.item
109- property: "foregroundColor"
110- value: root.foregroundColor
111- }
112+ property bool resetting: false
113+ property bool waiting: false
114+ property bool showWrongText: false
115+ focus: true
116+
117+ source: {
118+ if (resetting || !root.required) {
119+ return ""
120+ } else if (root.delayMinutes > 0) {
121+ return "DelayedLockscreen.qml"
122+ } else if (root.alphaNumeric) {
123+ return "PassphraseLockscreen.qml"
124+ } else {
125+ return "PinLockscreen.qml"
126+ }
127+ }
128+ onSourceChanged: {
129+ waiting = false
130+ showWrongText = false
131+ }
132+
133+ Connections {
134+ target: pinPadLoader.item
135+
136+ onEntered: {
137+ pinPadLoader.waiting = true
138+ root.entered(passphrase);
139+ }
140+
141+ onCancel: {
142+ root.cancel()
143+ }
144+ }
145+
146+ Binding {
147+ target: pinPadLoader.item
148+ property: "minPinLength"
149+ value: root.minPinLength
150+ }
151+ Binding {
152+ target: pinPadLoader.item
153+ property: "maxPinLength"
154+ value: root.maxPinLength
155+ }
156+ Binding {
157+ target: pinPadLoader.item
158+ property: "infoText"
159+ value: root.infoText
160+ }
161+ Binding {
162+ target: pinPadLoader.item
163+ property: "retryText"
164+ value: root.retryText
165+ }
166+ Binding {
167+ target: pinPadLoader.item
168+ property: "errorText"
169+ value: pinPadLoader.showWrongText ? root.errorText : ""
170+ }
171+ Binding {
172+ target: pinPadLoader.item
173+ property: "entryEnabled"
174+ value: !pinPadLoader.waiting
175+ }
176+ Binding {
177+ target: pinPadLoader.item
178+ property: "alphaNumeric"
179+ value: root.alphaNumeric
180+ }
181+ Binding {
182+ target: pinPadLoader.item
183+ property: "delayMinutes"
184+ value: root.delayMinutes
185+ }
186+ Binding {
187+ target: pinPadLoader.item
188+ property: "showCancelButton"
189+ value: root.showCancelButton
190+ }
191+ Binding {
192+ target: pinPadLoader.item
193+ property: "foregroundColor"
194+ value: root.foregroundColor
195 }
196 }
197
198
199=== modified file 'qml/Components/PassphraseLockscreen.qml'
200--- qml/Components/PassphraseLockscreen.qml 2015-07-15 15:07:19 +0000
201+++ qml/Components/PassphraseLockscreen.qml 2016-03-05 10:19:12 +0000
202@@ -18,10 +18,11 @@
203 import Ubuntu.Components 1.3
204 import "../Components"
205
206-Item {
207+FocusScope {
208 id: root
209 y: units.gu(4)
210 height: shakeContainer.height
211+ focus: true
212
213 property string infoText
214 property string errorText
215@@ -42,8 +43,6 @@
216 }
217 }
218
219- onActiveFocusChanged: if (activeFocus) pinentryField.forceActiveFocus()
220-
221 Column {
222 id: shakeContainer
223 anchors.horizontalCenter: parent.horizontalCenter
224@@ -59,14 +58,16 @@
225 text: root.infoText
226 }
227
228- Item {
229+ FocusScope {
230 id: entryContainer
231 anchors { left: parent.left; right: parent.right; margins: units.gu(2) }
232 height: units.gu(4)
233+ focus: true
234
235 TextInput {
236 id: pinentryField
237 objectName: "pinentryField"
238+ focus: true
239
240 property bool incorrectOverride: false
241
242
243=== modified file 'qml/Components/PinLockscreen.qml'
244--- qml/Components/PinLockscreen.qml 2015-07-15 15:07:19 +0000
245+++ qml/Components/PinLockscreen.qml 2016-03-05 10:19:12 +0000
246@@ -19,8 +19,9 @@
247 import Ubuntu.Components.ListItems 1.3
248 import "../Components"
249
250-Item {
251+FocusScope {
252 id: root
253+ focus: true
254
255 property string infoText
256 property string retryText
257@@ -45,6 +46,24 @@
258 }
259 }
260
261+ Keys.onPressed: {
262+ if (pinentryField.text.length == root.maxPinLength)
263+ return;
264+
265+ if (event.key === Qt.Key_Backspace) {
266+ pinentryField.backspace();
267+ } else if (event.key === Qt.Key_Delete || event.key === Qt.Key_Escape) {
268+ closeButton.clicked()
269+ } else if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
270+ confirmButton.clicked()
271+ } else {
272+ var digit = parseInt(event.text);
273+ if (!isNaN(digit) && typeof digit == "number") {
274+ pinentryField.appendNumber(digit);
275+ }
276+ }
277+ }
278+
279 Column {
280 anchors {
281 left: parent.left;
282@@ -204,6 +223,7 @@
283 width: numbersGrid.buttonWidth
284 }
285 PinPadButton {
286+ id: closeButton
287 iconName: "close"
288 height: units.gu(5) // visual spec has this row a little closer in
289 width: numbersGrid.buttonWidth
290@@ -216,6 +236,7 @@
291 width: numbersGrid.buttonWidth
292 }
293 PinPadButton {
294+ id: confirmButton
295 iconName: "tick"
296 objectName: "confirmButton"
297 height: units.gu(5)
298
299=== modified file 'qml/Greeter/NarrowView.qml'
300--- qml/Greeter/NarrowView.qml 2015-11-19 16:55:31 +0000
301+++ qml/Greeter/NarrowView.qml 2016-03-05 10:19:12 +0000
302@@ -125,6 +125,18 @@
303 onCancel: coverPage.show()
304 onEmergencyCall: root.emergencyCall()
305
306+ onEnabledChanged: {
307+ if (enabled) {
308+ lockscreen.forceActiveFocus();
309+ }
310+ }
311+
312+ onVisibleChanged: {
313+ if (visible) {
314+ lockscreen.forceActiveFocus();
315+ }
316+ }
317+
318 function maybeShow() {
319 if (root.locked && !shown) {
320 showNow();
321
322=== modified file 'tests/qmltests/Components/tst_Lockscreen.qml'
323--- tests/qmltests/Components/tst_Lockscreen.qml 2015-07-15 15:07:19 +0000
324+++ tests/qmltests/Components/tst_Lockscreen.qml 2016-03-05 10:19:12 +0000
325@@ -235,11 +235,14 @@
326
327 function test_unlock_data() {
328 return [
329- {tag: "numeric", alphanumeric: false, password: "1234", minPinLength: 4, maxPinLength: 4},
330- {tag: "alphanumeric", alphanumeric: true, password: "password", minPinLength: -1, maxPinLength: -1},
331- {tag: "numeric (wrong)", alphanumeric: false, password: "4321", minPinLength: 4, maxPinLength: 4},
332- {tag: "alphanumeric (wrong)", alphanumeric: true, password: "drowssap", minPinLength: -1, maxPinLength: -1},
333- {tag: "flexible length", alphanumeric: false, password: "1234", minPinLength: -1, maxPinLength: -1},
334+ {tag: "numeric", alphanumeric: false, password: "1234", minPinLength: 4, maxPinLength: 4, keyboard: false},
335+ {tag: "alphanumeric", alphanumeric: true, password: "password", minPinLength: -1, maxPinLength: -1, keyboard: false},
336+ {tag: "numeric (wrong)", alphanumeric: false, password: "4321", minPinLength: 4, maxPinLength: 4, keyboard: false},
337+ {tag: "alphanumeric (wrong)", alphanumeric: true, password: "drowssap", minPinLength: -1, maxPinLength: -1, keyboard: false},
338+ {tag: "flexible length", alphanumeric: false, password: "1234", minPinLength: -1, maxPinLength: -1, keyboard: false},
339+ {tag: "numeric", alphanumeric: false, password: "1234", minPinLength: 4, maxPinLength: 4, keyboard: true},
340+ {tag: "numeric (wrong)", alphanumeric: false, password: "4321", minPinLength: 4, maxPinLength: 4, keyboard: true},
341+ {tag: "flexible length", alphanumeric: false, password: "1234", minPinLength: -1, maxPinLength: -1, keyboard: true}
342 ]
343 }
344
345@@ -259,8 +262,12 @@
346 } else {
347 for (var i = 0; i < data.password.length; ++i) {
348 var character = data.password.charAt(i)
349- var button = findChild(lockscreen, "pinPadButton" + character)
350- mouseClick(button, units.gu(1), units.gu(1))
351+ if (data.keyboard) {
352+ typeString(character)
353+ } else {
354+ var button = findChild(lockscreen, "pinPadButton" + character)
355+ mouseClick(button, units.gu(1), units.gu(1))
356+ }
357 }
358 var confirmButton = findChild(lockscreen, "confirmButton");
359 mouseClick(confirmButton, units.gu(1), units.gu(1));

Subscribers

People subscribed via source and target branches