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

List:       kde-frameworks-devel
Subject:    Re: Review Request 127829: use QUrl::fromUserInput to construct sound url
From:       Martin Klapetek <martin.klapetek () gmail ! com>
Date:       2016-05-04 15:43:29
Message-ID: 20160504154329.15439.36601 () mimi ! kde ! org
[Download RAW message or body]

--===============2280448415896183994==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127829/#review95170
-----------------------------------------------------------


Ship it!




Ship It!

- Martin Klapetek


On May 4, 2016, 3:26 p.m., Harald Sitter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127829/
> -----------------------------------------------------------
> 
> (Updated May 4, 2016, 3:26 p.m.)
> 
> 
> Review request for KDE Frameworks and Martin Klapetek.
> 
> 
> Bugs: 337276
> https://bugs.kde.org/show_bug.cgi?id=337276
> 
> 
> Repository: knotifyconfig
> 
> 
> Description
> -------
> 
> QUrl() would treats it as a parsable uri, but they aren't e.g. # in a uri
> separates segments in a local file path it simply is a #.
> This "accidentally" worked in Phonon < 4.9 as Phonon obtained string
> representations in a way that would bypass internal QUrl checks for
> fileyness and URI ambiguity. Since 4.9 Phonon expects scheme-less URLs to
> be local files, but QUrl() would most of the time not do that since it
> would honestly think the soundfilename is a random (i.e. not necessarily
> local) uri.
> 
> To fix this use QUrl::fromUserInput which behaves exactly like what we
> need to properly resolve relative names, urls, paths, full URIs.
> 
> This now works with input of the type:
> - Oxygen-Sys-Special.ogg
> - /usr/share/sounds/Oxygen-Sys-Special.ogg
> - file:///usr/share/sounds/Oxygen-Sys-Special.ogg
> - /usr/share/sounds/#KDE-Im-Cant-#Connect.ogg
> - file:///usr/share/sounds/#KDE-Im-Cant-#Connect.ogg
> - http://people.ubuntu.com/~apachelogger/sounds/sounds-3.5/KDE_Glass_Break.ogg
> (yes, we can have http notifications!!!! https://xkcd.com/1172/)
> 
> CCBUG: 337276
> 
> 
> Diffs
> -----
> 
> src/knotifyconfigactionswidget.cpp 98286c4d0e8a7deec5d35986a261222931afb60d 
> 
> Diff: https://git.reviewboard.kde.org/r/127829/diff/
> 
> 
> Testing
> -------
> 
> built and played all of the above
> 
> 
> Thanks,
> 
> Harald Sitter
> 
> 


--===============2280448415896183994==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127829/">https://git.reviewboard.kde.org/r/127829/</a>
  </td>
    </tr>
   </table>
   <br />



<p>

Ship it!

</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>  <br />









<p>- Martin Klapetek</p>


<br />
<p>On May 4th, 2016, 3:26 p.m. CEST, Harald Sitter wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Frameworks and Martin Klapetek.</div>
<div>By Harald Sitter.</div>


<p style="color: grey;"><i>Updated May 4, 2016, 3:26 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=337276">337276</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
knotifyconfig
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">QUrl() would treats it as a parsable uri, but they aren&#39;t e.g. # in \
a uri separates segments in a local file path it simply is a #.
This &quot;accidentally&quot; worked in Phonon &lt; 4.9 as Phonon obtained string
representations in a way that would bypass internal QUrl checks for
fileyness and URI ambiguity. Since 4.9 Phonon expects scheme-less URLs to
be local files, but QUrl() would most of the time not do that since it
would honestly think the soundfilename is a random (i.e. not necessarily
local) uri.

To fix this use QUrl::fromUserInput which behaves exactly like what we
need to properly resolve relative names, urls, paths, full URIs.

This now works with input of the type:
- Oxygen-Sys-Special.ogg
- /usr/share/sounds/Oxygen-Sys-Special.ogg
- file:///usr/share/sounds/Oxygen-Sys-Special.ogg
- /usr/share/sounds/#KDE-Im-Cant-#Connect.ogg
- file:///usr/share/sounds/#KDE-Im-Cant-#Connect.ogg
- http://people.ubuntu.com/~apachelogger/sounds/sounds-3.5/KDE_Glass_Break.ogg
(yes, we can have http notifications!!!! https://xkcd.com/1172/)

CCBUG: 337276</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">built and played all of the above</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/knotifyconfigactionswidget.cpp <span style="color: \
grey">(98286c4d0e8a7deec5d35986a261222931afb60d)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/127829/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============2280448415896183994==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


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

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