Merge lp:~josharenson/unity8/input-name-filter-proxy into lp:unity8
- input-name-filter-proxy
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michael Terry |
Approved revision: | 2206 |
Merged at revision: | 2253 |
Proposed branch: | lp:~josharenson/unity8/input-name-filter-proxy |
Merge into: | lp:unity8 |
Diff against target: |
58 lines (+26/-1) 1 file modified
qml/OrientedShell.qml (+26/-1) |
To merge this branch: | bzr merge lp:~josharenson/unity8/input-name-filter-proxy |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Terry | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Unity8 CI Bot | continuous-integration | Needs Fixing | |
Review via email: mp+286684@code.launchpad.net |
Commit message
Allow the shell to blacklist input devices and force the OSK shown.
This is a work arround to prevent autopilot tests from failing.
Description of the change
* Are there any related MPs required for this MP to build/function as expected? Please list.
N
* Did you perform an exploratory manual test run of your code change and any related functionality?
Y
* Did you make sure that your branch does not contain spurious tags?
Y
* 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
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2202
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Terry (mterry) wrote : | # |
- onCountChanged -- what about if the count stays the same but the contents change? Is that possible / is there a different signal that could be used?
- blacklisted is an odd term for this. What about something more descriptive like forcedOskEnabled or autopilotMode or something.
- Would this mean there's no way to test u8 without OSK being present? That *might* be a path we'd want to test. Not necessarily a blocker for this, since I assume we don't have tests like that now. But is there a lighter touch we could employ, like an environment variable?
- Is the indenting on oskEnabled right? I'd expect the second line to be lined up after the colon.
Josh Arenson (josharenson) wrote : | # |
> - onCountChanged -- what about if the count stays the same but the contents
> change? Is that possible / is there a different signal that could be used?
I'm wondering how a device could be added or removed without changing the count... I agree that it isn't a good signal to rely on and I'll explore alternatives.
>
> - blacklisted is an odd term for this. What about something more descriptive
> like forcedOskEnabled or autopilotMode or something.'
Noted.
>
> - Would this mean there's no way to test u8 without OSK being present? That
> *might* be a path we'd want to test. Not necessarily a blocker for this,
> since I assume we don't have tests like that now. But is there a lighter
> touch we could employ, like an environment variable?
The ultimate goal is to have ubuntu-keyboard provide "blacklist" (still working on a better name) information via gsettings. This means that osk will be forced only when specific tests call for it (as I envision it at least...). Thoughts?
>
> - Is the indenting on oskEnabled right? I'd expect the second line to be
> lined up after the colon.
Will fix.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2204
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2204
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:2205
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2205
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:2206
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2206
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Josh Arenson (josharenson) wrote : | # |
One more temporary solution.
Michael Terry (mterry) wrote : | # |
Looks good code wise.
Michael Terry (mterry) wrote : | # |
(looks like CI failed for unrelated reasons)
Preview Diff
1 | === modified file 'qml/OrientedShell.qml' |
2 | --- qml/OrientedShell.qml 2016-01-28 11:31:48 +0000 |
3 | +++ qml/OrientedShell.qml 2016-02-24 22:14:43 +0000 |
4 | @@ -19,6 +19,7 @@ |
5 | import Unity.InputInfo 0.1 |
6 | import Unity.Session 0.1 |
7 | import Unity.Screens 0.1 |
8 | +import Utils 0.1 |
9 | import GSettings 1.0 |
10 | import "Components" |
11 | import "Rotation" |
12 | @@ -77,6 +78,8 @@ |
13 | InputDeviceModel { |
14 | id: keyboardsModel |
15 | deviceFilter: InputInfo.Keyboard |
16 | + onDeviceAdded: forceOSKEnabled = autopilotDevicePresent(); |
17 | + onDeviceRemoved: forceOSKEnabled = autopilotDevicePresent(); |
18 | } |
19 | |
20 | InputDeviceModel { |
21 | @@ -84,6 +87,27 @@ |
22 | deviceFilter: InputInfo.TouchScreen |
23 | } |
24 | |
25 | + /* FIXME: This exposes the NameRole as a work arround for lp:1542224. |
26 | + * When QInputInfo exposes NameRole to QML, this should be removed. |
27 | + */ |
28 | + property bool forceOSKEnabled: false |
29 | + property var autopilotEmulatedDeviceNames: ["py-evdev-uinput"] |
30 | + UnitySortFilterProxyModel { |
31 | + id: autopilotDevices |
32 | + model: keyboardsModel |
33 | + } |
34 | + |
35 | + function autopilotDevicePresent() { |
36 | + for(var i = 0; i < autopilotDevices.count; i++) { |
37 | + var device = autopilotDevices.get(i); |
38 | + if (autopilotEmulatedDeviceNames.indexOf(device.name) != -1) { |
39 | + console.warn("Forcing the OSK to be enabled as there is an autopilot eumlated device present.") |
40 | + return true; |
41 | + } |
42 | + } |
43 | + return false; |
44 | + } |
45 | + |
46 | Screens { |
47 | id: screens |
48 | } |
49 | @@ -195,7 +219,8 @@ |
50 | // have multiple keyboards around. For now we only enable one keyboard at a time |
51 | // thus hiding it here if there is a physical one around or if we have a second |
52 | // screen (the virtual touchpad & osk on the phone) attached. |
53 | - oskEnabled: keyboardsModel.count === 0 && screens.count === 1 |
54 | + oskEnabled: (keyboardsModel.count === 0 && screens.count === 1) || |
55 | + forceOSKEnabled |
56 | |
57 | // TODO: Factor in the connected input devices (eg: physical keyboard, mouse, touchscreen), |
58 | // what's the output device (eg: big TV, desktop monitor, phone display), etc. |
PASSED: Continuous integration, rev:2202 /unity8- jenkins. ubuntu. com/job/ lp-unity8- 1-ci/449/ /unity8- jenkins. ubuntu. com/job/ build/604 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= vivid+overlay/ 190 /unity8- jenkins. ubuntu. com/job/ test-0- autopkgtest/ label=amd64, release= xenial/ 190 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/627 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 645 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 645 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 641 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 641/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial/ 641 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial/ 641/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 641 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 641/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial/ 641 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial/ 641/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 641 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 641/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial/ 641 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial/ 641/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-unity8- 1-ci/449/ rebuild
https:/