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
=== modified file 'qml/Notifications/Notification.qml'
--- qml/Notifications/Notification.qml 2014-08-29 08:22:34 +0000
+++ qml/Notifications/Notification.qml 2014-09-12 14:52:10 +0000
@@ -82,7 +82,7 @@
8282
83 // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really83 // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really
84 Component.onCompleted: {84 Component.onCompleted: {
85 if (opacity == 1.0 && hints["suppress-sound"] != "true" && sound.source) {85 if (opacity == 1.0 && hints["suppress-sound"] != "true" && sound.source != "") {
86 sound.play();86 sound.play();
87 }87 }
88 }88 }
8989
=== modified file 'tests/mocks/QtMultimedia/audio.cpp'
--- tests/mocks/QtMultimedia/audio.cpp 2014-08-26 08:14:44 +0000
+++ tests/mocks/QtMultimedia/audio.cpp 2014-09-12 14:52:10 +0000
@@ -77,7 +77,7 @@
7777
78void Audio::play()78void Audio::play()
79{79{
80 if (m_playbackState != PlayingState && m_source.isValid()) {80 if (m_playbackState != PlayingState) {
81 m_playbackState = PlayingState;81 m_playbackState = PlayingState;
82 Q_EMIT playbackStateChanged(m_playbackState);82 Q_EMIT playbackStateChanged(m_playbackState);
8383
8484
=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
--- tests/qmltests/Notifications/tst_Notifications.qml 2014-08-19 13:44:58 +0000
+++ tests/qmltests/Notifications/tst_Notifications.qml 2014-09-12 14:52:10 +0000
@@ -476,7 +476,7 @@
476 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")476 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
477477
478 var audioItem = findInvisibleChild(notification, "sound")478 var audioItem = findInvisibleChild(notification, "sound")
479 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)479 compare(audioItem.playbackState, data.hasSound ? Audio.PlayingState : Audio.StoppedState, "Audio has wrong state")
480480
481 if(data.buttonRowVisible) {481 if(data.buttonRowVisible) {
482 var buttonCancel = findChild(buttonRow, "notify_button1")482 var buttonCancel = findChild(buttonRow, "notify_button1")

Subscribers

People subscribed via source and target branches