<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/118604/">https://git.reviewboard.kde.org/r/118604/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On juni 14th, 2014, 8:54 a.m. UTC, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What if the file isn't local?
Sounds to me like the bug is elsewhere.
Of course for local files, showing a local path looks better than a file:/// URL, so this could be improved, but in a way that doesn't break remote files.
The use of KUrl::relativeUrl and putting that into a url looks quite suspicious to me, actually.
KUrl didn't work well with relative urls.
Maybe locationEditCurrentTextList should be changed into a qstringlist rather than a url list...
It would also be interesting to check if this works in the KIO framework (Qt5), where I ported it to QUrl...</pre>
</blockquote>
<p>On juni 14th, 2014, 6:22 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just tried it out on KF5. The issue as described on 335922 is partly present.
Input files:
f#1.png
f%1.png
f#2.png
f%2.png
Command used:
kdialog --multiple --getopenfilename ~ "*.png|PNG images"
kdialog output when selecting those four files:
/home/kde-devel/335922/f#1.png /home/kde-devel/335922/f#2.png /home/kde-devel/335922/f%251.png /home/kde-devel/335922/f%252.png
The files with a "#" in them seem to be parsed just fine in KF5. Those with a percent sign still get replaced by "%25".
</pre>
</blockquote>
<p>On juni 14th, 2014, 6:36 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Note: Something is fuzzy in that slotOk. When i add one debug line to see the output of locationEditCurrentTextList i get two results (as if slotOk is called twice). The output i get (in a readable way):
-- First "Orig QUrl list:"
- QUrl("file:///home/kde-devel/335922/f%231.png")
- QUrl( "file:///home/kde-devel/335922/f%232.png" )
- QUrl( "file:///home/kde-devel/335922/f%251.png" )
- QUrl( "file:///home/kde-devel/335922/f%252.png" )
-- Second "Orig QUrl list:"
- QUrl("file:///home/kde-devel/335922/f%231.png")
- QUrl( "file:///home/kde-devel/335922/f%232.png" )
- QUrl( "file:///home/kde-devel/335922/f%25251.png" ) <-- What happened here?
- QUrl( "file:///home/kde-devel/335922/f%25252.png" ) <-- What happened here?</pre>
</blockquote>
<p>On juni 14th, 2014, 6:37 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">"when i add one debug line" : http://p.sc2.nl/pn8jjrqmx :) Sorry for the extra noise.</pre>
</blockquote>
<p>On juni 14th, 2014, 8:04 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">More noise :)
I played with the code a bit and have it working. My changes are only in slotOk so that means the actual issue is in there as well. My "patch" smells somewhat hackish and i think David will not like this patch at all, hehe.
Here it is: http://p.sc2.nl/ppfe83z6a
The important change is:
- I got rid of the slotOk recursion in this code path (it's still in another else if).
- Because i don't enter the function for a second time, i had to make sure that locationEditCurrentTextList wasn't modified since that list would be needed later on. To do that i removed the "now recalculate all paths for them being relative in base of the top most url" loop and do that in the QStringList construction which was just a few lines down. This seems to work just fine and looks a little cleaner as well imho.
I don't know exactly how this code is supposed to work so i hope one of the authors of it (quite a few!) could have a look at what's really going wrong here.</pre>
</blockquote>
<p>On december 29th, 2014, 9:43 p.m. UTC, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="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;">By now the paste expired. Please use permanent URLs or reviewboard.</p></pre>
</blockquote>
<p>On december 30th, 2014, 12:13 p.m. UTC, <b>Mark Gaiser</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="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;">I had no clue that this rr was still alive. I'll see if i can figure out what i pasted (half a year ago). It might take a few days..</p></pre>
</blockquote>
</blockquote>
<pre style="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;">Damn sorry! I don't have the patch anymore. Not in my git nor in the website archive. The thing i vaguely remember is slotOk being called from within slotOk (small recursion). That then caused the parsed url's to be re-parsed which in turn ends up with the wrong results. Or that's what i recall along with the stuff i wrote above.</p></pre>
<br />
<p>- Mark</p>
<br />
<p>On juni 7th, 2014, 4:43 p.m. UTC, Victor Dodon 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 kdelibs, Albert Vaca Cintora and Aaron J. Seigo.</div>
<div>By Victor Dodon.</div>
<p style="color: grey;"><i>Updated jun 7, 2014, 4:43 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="http://bugs.kde.org/show_bug.cgi?id=335922">335922</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</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;">Only when selecting multiple files in KFileDialog, if a file contains in the name the characters '#' or '%', it is (wrongly) escaped.
The only modification needed is in kfilewidget.cpp, in slotOk, instead of appending to the stringList the pretty url, append the url.toLocalFile, to prevent the double escaping.</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>kfile/kfilewidget.cpp <span style="color: grey">(fc9b169)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118604/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>