[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D12606: Use QUrl::fromUserInput to construct sound url
From:       Wolfgang Bauer <noreply () phabricator ! kde ! org>
Date:       2018-04-29 21:06:15
Message-ID: 20180429210615.1.A00AAE8BB89A9ED7 () phabricator ! kde ! org
[Download RAW message or body]

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


[Attachment #3 (unknown)]

<table><tr><td style="">wbauer created this revision.<br />wbauer added a reviewer: \
Plasma.<br />Restricted Application added a project: Plasma.<br />Restricted \
Application added a subscriber: plasma-devel.<br />wbauer requested review of this \
revision. </td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; \
float: right; color: #464C5C; font-weight: bold; border-radius: 3px; \
background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); \
display: inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D12606">View Revision</a></tr></table><br \
/><div><strong>REVISION SUMMARY</strong><div><p>Since Phonon 4.9, this code fails to \
play a login sound if the sound file is specified as absolute file path (without \
&quot;file://&quot;). 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.<br /> This patch uses QUrl::fromUserInput() instead to create a QUrl from \
the string in the settings file, which fixes the problem.</p>

<p>This is the same change as <a \
href="https://phabricator.kde.org/R289:9db06adc8114163f401417064b07772139bc36bc" \
class="remarkup-link" target="_blank" \
rel="noreferrer">https://phabricator.kde.org/R289:9db06adc8114163f401417064b07772139bc36bc</a> \
in knotification.<br /> A more detailed explanation of the problem can be found in <a \
href="https://bugs.kde.org/show_bug.cgi?id=337276#c12" class="remarkup-link" \
target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=337276#c12</a> \
.</p>

<p>BUG: 392725<br />
FIXED-IN: 5.12.5</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Enabled \
the login sound and logged in with these lines in \
~/.config/plasma_workspace.notifyrc:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Sound=/usr/share/sounds/Oxygen-Sys-Log-In-Long.ogg</li>
 <li class="remarkup-list-item">Sound=Oxygen-Sys-Log-In-Long.ogg</li>
<li class="remarkup-list-item">Sound=file:///usr/share/sounds/Oxygen-Sys-Log-In-Long.ogg</li>
 <li class="remarkup-list-item">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)</li> </ul>

<p>The login sound was played in every case now.</p></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R120 Plasma \
Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D12606">https://phabricator.kde.org/D12606</a></div></div><br \
/><div><strong>AFFECTED \
FILES</strong><div><div>ksmserver/startup.cpp</div></div></div><br /><div><strong>To: \
</strong>wbauer, Plasma<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, \
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br \
/></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic