D12606: Use QUrl::fromUserInput to construct sound url
Wolfgang Bauer
noreply at phabricator.kde.org
Sun Apr 29 21:06:15 UTC 2018
wbauer created this revision.
wbauer added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
wbauer requested review of this revision.
REVISION SUMMARY
Since Phonon 4.9, this code fails to play a login sound if the sound file is specified as absolute file path (without "file://"). The reason is because QUrl() treats the parameter as Url (not as file path), and this only accidentally worked with earlier Phonon versions but not anymore.
This patch uses QUrl::fromUserInput() instead to create a QUrl from the string in the settings file, which fixes the problem.
This is the same change as https://phabricator.kde.org/R289:9db06adc8114163f401417064b07772139bc36bc in knotification.
A more detailed explanation of the problem can be found in https://bugs.kde.org/show_bug.cgi?id=337276#c12 .
BUG: 392725
FIXED-IN: 5.12.5
TEST PLAN
Enabled the login sound and logged in with these lines in ~/.config/plasma_workspace.notifyrc:
- Sound=/usr/share/sounds/Oxygen-Sys-Log-In-Long.ogg
- Sound=Oxygen-Sys-Log-In-Long.ogg
- Sound=file:///usr/share/sounds/Oxygen-Sys-Log-In-Long.ogg
- and with no Sound= at all (which means it uses the one from the system-wide plasma_workspace.notifyrc, which happens to be Sound=Oxygen-Sys-Log-In-Short.ogg)
The login sound was played in every case now.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D12606
AFFECTED FILES
ksmserver/startup.cpp
To: wbauer, #plasma
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180429/ccc0520d/attachment.html>
More information about the Plasma-devel
mailing list