on xenial help sign in
bool(QUrl("")) == true :/
7dde7aeMichał Sawicz
qml/Notifications/Notification.qml+1−1
@@ -82,7 +82,7 @@ Item {
82
82
83 // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really
83 // 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 }
tests/mocks/QtMultimedia/audio.cpp+1−1
@@ -77,7 +77,7 @@ void Audio::pause()
77
77
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);
83
83
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -476,7 +476,7 @@ Row {
476 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
476 compare(buttonRow.visible, data.buttonRowVisible, "button visibility is incorrect")
477
477
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")
480
480
481 if(data.buttonRowVisible) {
481 if(data.buttonRowVisible) {
482 var buttonCancel = findChild(buttonRow, "notify_button1")
482 var buttonCancel = findChild(buttonRow, "notify_button1")