[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 130177: Fix 'Deprecated hint for KUrl::path() is wrong on Windows'
From: Kevin Funk <kfunk () kde ! org>
Date: 2017-07-13 11:53:03
Message-ID: 20170713115303.5215.80825 () mimi ! kde ! org
[Download RAW message or body]
--===============0081579263504702102==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
> On July 12, 2017, 9:11 a.m., Kevin Funk wrote:
> > src/kdecore/kurl.h, line 437
> > <https://git.reviewboard.kde.org/r/130177/diff/1/?file=497118#file497118line437>
> >
> > Maybe it's also worth pointing people to \
> > `QUrl::toDisplayString(QUrl::PreferLocalFile | ...)` as well -- because in fact \
> > that's what most people want when having used `KUrl::path()` before.
> > I've fixed `QUrl::toDisplayString(QUrl::PreferLocalFile | ...)` in Qt 5.6 to do \
> > what one would expect from it...
>
> David Faure wrote:
> I wouldn't point to QUrl::toDisplayString(), because that's definitely not what \
> KUrl::path() was doing before (think about remote URLs).
> The correct migration path from KUrl::path() is indeed QUrl::path() or \
> QUrl::toLocalFile() (because a lot of the old code written with KUrl is from \
> before toLocalFile() even existed, back from when we didn't really support \
> Windows).
Fair enough. I've probably just seen too many wrong ports of `KUrl::path()` to \
`QUrl::path()` where people actually wanted `QUrl::toDisplayString(...)`...
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130177/#review103432
-----------------------------------------------------------
On July 12, 2017, 6:10 a.m., Ralf Habacker wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130177/
> -----------------------------------------------------------
>
> (Updated July 12, 2017, 6:10 a.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Bugs: 382242
> https://bugs.kde.org/show_bug.cgi?id=382242
>
>
> Repository: kdelibs4support
>
>
> Description
> -------
>
> This patch extends the documentation of KUrl::path() to use toLocalFile() for local \
> file urls. See bug for more details
>
> Diffs
> -----
>
> src/kdecore/kurl.h 1dcd77cca66b4ebc6fcdaa36a5451a71227eecb7
>
> Diff: https://git.reviewboard.kde.org/r/130177/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Ralf Habacker
>
>
--===============0081579263504702102==
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/130177/">https://git.reviewboard.kde.org/r/130177/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On July 12th, 2017, 9:11 a.m. UTC, <b>Kevin \
Funk</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/130177/diff/1/?file=497118#file497118line437" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kdecore/kurl.h</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">437</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * \
@deprecated since 5.0, use <span class="hl">Q</span>Url::<span class="hl">path(). If \
RemoveTrailingSlash was used, use</span></span></pre></td> <th bgcolor="#e9eaa8" \
style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">437</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * \
@deprecated since 5.0, use <span class="hl">O</span>Url::<span \
class="hl">toLocalFile() for locale file urls and</span></span></pre></td> </tr>
</tbody>
</table>
<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;">Maybe \
it's also worth pointing people to <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">QUrl::toDisplayString(QUrl::PreferLocalFile | ...)</code> as well -- \
because in fact that's what most people want when having used <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">KUrl::path()</code> before.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've \
fixed <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">QUrl::toDisplayString(QUrl::PreferLocalFile | \
...)</code> in Qt 5.6 to do what one would expect from it...</p></pre> </blockquote>
<p>On July 13th, 2017, 11:30 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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
wouldn't point to QUrl::toDisplayString(), because that's definitely not what \
KUrl::path() was doing before (think about remote URLs).</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The \
correct migration path from KUrl::path() is indeed QUrl::path() or \
QUrl::toLocalFile() (because a lot of the old code written with KUrl is from before \
toLocalFile() even existed, back from when we didn't really support \
Windows).</p></pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; 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;">Fair enough. I've probably just seen too many wrong ports of <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">KUrl::path()</code> to <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">QUrl::path()</code> where people actually wanted <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">QUrl::toDisplayString(...)</code>...</p></pre> <br />
<p>- Kevin</p>
<br />
<p>On July 12th, 2017, 6:10 a.m. UTC, Ralf Habacker 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.</div>
<div>By Ralf Habacker.</div>
<p style="color: grey;"><i>Updated July 12, 2017, 6:10 a.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=382242">382242</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs4support
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This patch extends the documentation of KUrl::path() \
to use toLocalFile() for local file urls. See bug for more details</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/kdecore/kurl.h <span style="color: \
grey">(1dcd77cca66b4ebc6fcdaa36a5451a71227eecb7)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/130177/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============0081579263504702102==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic