Merge lp:~mfrey/unity8/lock-fix into lp:unity8

Proposed by Michael Frey
Status: Superseded
Proposed branch: lp:~mfrey/unity8/lock-fix
Merge into: lp:unity8
Diff against target: 13 lines (+2/-1)
1 file modified
qml/Shell.qml (+2/-1)
To merge this branch: bzr merge lp:~mfrey/unity8/lock-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Terry Approve
Albert Astals Cid (community) Needs Fixing
Ricardo Salveti (community) Approve
Review via email: mp+238918@code.launchpad.net

This proposal has been superseded by a proposal from 2014-10-20.

Commit message

Added a check for Proximity to determine if we show the lock screen.

Description of the change

Added a check for Proximity to determine if we show the lock screen.
Fixes #1378012 and #1378043

To post a comment you must log in.
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

LGTM

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

 4/18 Test #4: whitespace .......................***Failed 1.07 sec
/tmp/buildd/unity8-8.00+14.10.20141013.2bzr1369pkg0utopic1693/qml/Shell.qml: bad whitespace in line 597

review: Needs Fixing
lp:~mfrey/unity8/lock-fix updated
1370. By Michael Frey

Remove extra white space.

Revision history for this message
Michael Terry (mterry) wrote :

Is this a race between callManager.hasCalls and the status change signal?

Revision history for this message
Michael Frey (mfrey) wrote :

> Is this a race between callManager.hasCalls and the status change signal?

Yes.

Revision history for this message
Michael Terry (mterry) wrote :

Also, in terms of style:
- Is there a reason you use a grouping parens?
- Use a triple-equal symbol like !== instead of !=
- And the if end-line continuation should look like:

if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
        !callManager.hasCalls && !edgeDemo.running) {
    foo...
}

Or maybe even for better clarity:

if (Powerd.status === Powerd.Off &&
        reason !== Powerd.Proximity &&
        !callManager.hasCalls &&
        !edgeDemo.running) {
    foo...
}

lp:~mfrey/unity8/lock-fix updated
1371. By Michael Frey

Better style.

Revision history for this message
Michael Frey (mfrey) wrote :

> Also, in terms of style:
> - Is there a reason you use a grouping parens?
> - Use a triple-equal symbol like !== instead of !=
> - And the if end-line continuation should look like:
>
> if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
> !callManager.hasCalls && !edgeDemo.running) {
> foo...
> }
>
> Or maybe even for better clarity:
>
> if (Powerd.status === Powerd.Off &&
> reason !== Powerd.Proximity &&
> !callManager.hasCalls &&
> !edgeDemo.running) {
> foo...
> }

Good catch. Fixed the style and pushed.

lp:~mfrey/unity8/lock-fix updated
1372. By Michael Frey

One more time for formatting.

Revision history for this message
Michael Terry (mterry) wrote :

Love it!

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

(assuming that jenkins likes it too this time)

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

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Shell.qml'
2--- qml/Shell.qml 2014-10-13 15:41:29 +0000
3+++ qml/Shell.qml 2014-10-20 18:34:08 +0000
4@@ -594,7 +594,8 @@
5 target: Powerd
6
7 onStatusChanged: {
8- if (Powerd.status === Powerd.Off && !callManager.hasCalls && !edgeDemo.running) {
9+ if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
10+ !callManager.hasCalls && !edgeDemo.running) {
11 greeter.showNow()
12 }
13 }

Subscribers

People subscribed via source and target branches