Merge lp:~aacid/unity8/new_and_old_audio_role into lp:unity8
- new_and_old_audio_role
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 2012 |
Merged at revision: | 2028 |
Proposed branch: | lp:~aacid/unity8/new_and_old_audio_role |
Merge into: | lp:unity8 |
Prerequisite: | lp:~aacid/unity8/use_quick_24 |
Diff against target: |
112 lines (+45/-7) 4 files modified
qml/Components/NotificationAudio.qml (+42/-0) qml/Components/ScreenGrabber.qml (+1/-3) qml/Notifications/Notification.qml (+2/-3) tests/qmltests/Notifications/tst_OptionToggle.qml (+0/-1) |
To merge this branch: | bzr merge lp:~aacid/unity8/new_and_old_audio_role |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Timo Jyrinki | Pending | ||
Review via email: mp+275735@code.launchpad.net |
This proposal supersedes a proposal from 2015-10-22.
Commit message
Add an Item that proxies for old and new audio roles
Description of the change
* Are there any related MPs required for this MP to build/function as expected?
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
Timo Jyrinki (timo-jyrinki) wrote : Posted in a previous version of this proposal | # |
Michał Sawicz (saviq) : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2005
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
> This should be Notification, not Alarm.
Fixed
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal | # |
> Could make that a binding instead of onCompleted, wdyt?
I think the code is harder to understand since you need to see that the binding code will only be executed once which is not trivial with a binding but quite clear with onCompleted.
I'd prefer to leave it like this.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2007
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2008
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://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2009
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://
Michał Sawicz (saviq) : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:2010
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2011
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 2012. By Albert Astals Cid
-
log--
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2012
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2012
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: 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://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:2012
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://
ABORTED: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Y
* Did CI run pass? If not, please explain why.
xenial broken
* Did you make sure that the branch does not contain spurious tags?
Y
Preview Diff
1 | === added file 'qml/Components/NotificationAudio.qml' |
2 | --- qml/Components/NotificationAudio.qml 1970-01-01 00:00:00 +0000 |
3 | +++ qml/Components/NotificationAudio.qml 2015-10-29 14:19:48 +0000 |
4 | @@ -0,0 +1,42 @@ |
5 | +/* |
6 | + * Copyright (C) 2015 Canonical, Ltd. |
7 | + * |
8 | + * This program is free software; you can redistribute it and/or modify |
9 | + * it under the terms of the GNU General Public License as published by |
10 | + * the Free Software Foundation; version 3. |
11 | + * |
12 | + * This program is distributed in the hope that it will be useful, |
13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | + * GNU General Public License for more details. |
16 | + * |
17 | + * You should have received a copy of the GNU General Public License |
18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | + */ |
20 | + |
21 | +import QtQuick 2.4 |
22 | + |
23 | +Item { |
24 | + id: root |
25 | + property string source: "" |
26 | + readonly property var playbackState: priv.audio ? priv.audio.playbackState : 0 |
27 | + |
28 | + function play() { |
29 | + priv.audio.play(); |
30 | + } |
31 | + function stop() { |
32 | + priv.audio.stop(); |
33 | + } |
34 | + |
35 | + QtObject { |
36 | + id: priv |
37 | + property var audio: { |
38 | + try { |
39 | + return Qt.createQmlObject("import QtMultimedia 5.6; Audio { source: root.source; audioRole: MediaPlayer.NotificationRole }", priv) |
40 | + } catch(err) { |
41 | + console.log("Upstream audioRole enum not available, falling back to old role name."); |
42 | + return Qt.createQmlObject("import QtMultimedia 5.0; Audio { source: root.source; audioRole: MediaPlayer.alert }", priv) |
43 | + } |
44 | + } |
45 | + } |
46 | +} |
47 | |
48 | === modified file 'qml/Components/ScreenGrabber.qml' |
49 | --- qml/Components/ScreenGrabber.qml 2015-10-29 14:19:47 +0000 |
50 | +++ qml/Components/ScreenGrabber.qml 2015-10-29 14:19:48 +0000 |
51 | @@ -15,7 +15,6 @@ |
52 | */ |
53 | |
54 | import QtQuick 2.4 |
55 | -import QtMultimedia 5.0 |
56 | import ScreenGrabber 0.1 |
57 | import GlobalShortcut 1.0 |
58 | |
59 | @@ -40,9 +39,8 @@ |
60 | onTriggered: capture() |
61 | } |
62 | |
63 | - Audio { |
64 | + NotificationAudio { |
65 | id: shutterSound |
66 | - audioRole: MediaPlayer.alert |
67 | source: "/system/media/audio/ui/camera_click.ogg" |
68 | } |
69 | |
70 | |
71 | === modified file 'qml/Notifications/Notification.qml' |
72 | --- qml/Notifications/Notification.qml 2015-10-29 14:19:47 +0000 |
73 | +++ qml/Notifications/Notification.qml 2015-10-29 14:19:48 +0000 |
74 | @@ -15,13 +15,13 @@ |
75 | */ |
76 | |
77 | import QtQuick 2.4 |
78 | -import QtMultimedia 5.0 |
79 | import Powerd 0.1 |
80 | import Ubuntu.Components 1.3 |
81 | import Ubuntu.Components.ListItems 1.3 as ListItem |
82 | import Unity.Notifications 1.0 |
83 | import QMenuModel 0.1 |
84 | import Utils 0.1 |
85 | +import "../Components" |
86 | |
87 | Item { |
88 | id: notification |
89 | @@ -80,10 +80,9 @@ |
90 | return result; |
91 | } |
92 | |
93 | - Audio { |
94 | + NotificationAudio { |
95 | id: sound |
96 | objectName: "sound" |
97 | - audioRole: MediaPlayer.alert |
98 | source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : "" |
99 | } |
100 | |
101 | |
102 | === modified file 'tests/qmltests/Notifications/tst_OptionToggle.qml' |
103 | --- tests/qmltests/Notifications/tst_OptionToggle.qml 2015-10-29 14:19:47 +0000 |
104 | +++ tests/qmltests/Notifications/tst_OptionToggle.qml 2015-10-29 14:19:48 +0000 |
105 | @@ -24,7 +24,6 @@ |
106 | import Ubuntu.Components 1.3 |
107 | import Unity.Test 0.1 |
108 | import Unity.Notifications 1.0 |
109 | -import QtMultimedia 5.0 |
110 | |
111 | Row { |
112 | id: rootRow |
Compiled in https:/ /launchpad. net/~ci- train-ppa- service/ +archive/ ubuntu/ landing- 012/+packages for Qt 5.5.1 and works great!