Merge lp:~unity-team/unity8/notifications-audio-no-play-empty into lp:unity8

Proposed by Michał Sawicz
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 1263
Merged at revision: 1265
Proposed branch: lp:~unity-team/unity8/notifications-audio-no-play-empty
Merge into: lp:unity8
Diff against target: 38 lines (+3/-3)
3 files modified
qml/Notifications/Notification.qml (+1/-1)
tests/mocks/QtMultimedia/audio.cpp (+1/-1)
tests/qmltests/Notifications/tst_Notifications.qml (+1/-1)
To merge this branch: bzr merge lp:~unity-team/unity8/notifications-audio-no-play-empty
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Ricardo Salveti (community) Approve
Ricardo Mendoza (community) Approve
Mirco Müller (community) Approve
Review via email: mp+234486@code.launchpad.net

Commit message

Don't play empty urls in Notification.qml

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

To post a comment you must log in.
1263. By Michał Sawicz

bool(QUrl("")) == true :/

Revision history for this message
Mirco Müller (macslow) wrote :

lgtm... approved

review: Approve
Revision history for this message
Ricardo Mendoza (ricmm) wrote :

lgtm!

review: Approve
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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Notifications/Notification.qml'
2--- qml/Notifications/Notification.qml 2014-08-29 08:22:34 +0000
3+++ qml/Notifications/Notification.qml 2014-09-12 14:52:10 +0000
4@@ -82,7 +82,7 @@
5
6 // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really
7 Component.onCompleted: {
8- if (opacity == 1.0 && hints["suppress-sound"] != "true" && sound.source) {
9+ if (opacity == 1.0 && hints["suppress-sound"] != "true" && sound.source != "") {
10 sound.play();
11 }
12 }
13
14=== modified file 'tests/mocks/QtMultimedia/audio.cpp'
15--- tests/mocks/QtMultimedia/audio.cpp 2014-08-26 08:14:44 +0000
16+++ tests/mocks/QtMultimedia/audio.cpp 2014-09-12 14:52:10 +0000
17@@ -77,7 +77,7 @@
18
19 void Audio::play()
20 {
21- if (m_playbackState != PlayingState && m_source.isValid()) {
22+ if (m_playbackState != PlayingState) {
23 m_playbackState = PlayingState;
24 Q_EMIT playbackStateChanged(m_playbackState);
25
26
27=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
28--- tests/qmltests/Notifications/tst_Notifications.qml 2014-08-19 13:44:58 +0000
29+++ tests/qmltests/Notifications/tst_Notifications.qml 2014-09-12 14:52:10 +0000
30@@ -476,7 +476,7 @@
31 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
32
33 var audioItem = findInvisibleChild(notification, "sound")
34- tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
35+ compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")
36
37 if(data.buttonRowVisible) {
38 var buttonCancel = findChild(buttonRow, "notify_button1")

Subscribers

People subscribed via source and target branches