[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request: Display the tab title on root (/) folder properly
From: "Dawit Alemayehu" <adawit () kde ! org>
Date: 2011-05-16 22:05:01
Message-ID: 20110516220501.1106.99221 () vidsolbach ! de
[Download RAW message or body]
> On May 16, 2011, 9:36 p.m., Peter Penz wrote:
> > The patch is fine from my point of view, but Konqueror is maintained by David \
> > Faure -> it's up to David for a final "ship it" :-)
Actually the bug here is the fact that url.fileName() is used to retrieve a directory \
name. Though that does not make sense, at least not to me, it works correctly for \
non-root paths because fileName() ignores trailing slashes by default. IOW, it works \
because by default the fileName function treats the last path as if it is a file, \
which to me, seems very hackish. Anyhow, your fix unnecessarily creates a temporary \
KUrl object that will to additionally parse "file:///". You could achieve the same \
thing without such cost by adding
if (adjustCaption.isEmpty() && url.isLocalFile())
adjustCaption = QLatin1Char('/');
after the "adjustCaption = url.fileName()" call.
- Dawit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101374/#review3354
-----------------------------------------------------------
On May 16, 2011, 9:43 p.m., Burkhard Lück wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101374/
> -----------------------------------------------------------
>
> (Updated May 16, 2011, 9:43 p.m.)
>
>
> Review request for KDE Base Apps, David Faure and Peter Penz.
>
>
> Summary
> -------
>
> Konqueror in filemanager mode shows an empty tab title on browsing root (/) folder. \
> Dolphin displays the tab title on root (/) folder properly, so this patch is a copy \
> of three lines from dolphin dolphinmainwindow.cpp.
>
> This addresses bug 153573.
> http://bugs.kde.org/show_bug.cgi?id=153573
>
>
> Diffs
> -----
>
> konqueror/src/konqview.cpp 699c9d5
>
> Diff: http://git.reviewboard.kde.org/r/101374/diff
>
>
> Testing
> -------
>
> compiled and works for me
>
>
> Thanks,
>
> Burkhard
>
>
[Attachment #3 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/101374/">http://git.reviewboard.kde.org/r/101374/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On May 16th, 2011, 9:36 p.m., <b>Peter Penz</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;">The patch \
is fine from my point of view, but Konqueror is maintained by David Faure -> \
it's up to David for a final "ship it" :-)</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;">Actually the bug here is \
the fact that url.fileName() is used to retrieve a directory name. Though that does \
not make sense, at least not to me, it works correctly for non-root paths because \
fileName() ignores trailing slashes by default. IOW, it works because by default the \
fileName function treats the last path as if it is a file, which to me, seems very \
hackish. Anyhow, your fix unnecessarily creates a temporary KUrl object that will to \
additionally parse "file:///". You could achieve the same thing without \
such cost by adding
if (adjustCaption.isEmpty() && url.isLocalFile())
adjustCaption = QLatin1Char('/');
after the "adjustCaption = url.fileName()" call.</pre>
<br />
<p>- Dawit</p>
<br />
<p>On May 16th, 2011, 9:43 p.m., Burkhard Lück wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for KDE Base Apps, David Faure and Peter Penz.</div>
<div>By Burkhard Lück.</div>
<p style="color: grey;"><i>Updated May 16, 2011, 9:43 p.m.</i></p>
<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;">Konqueror in filemanager mode shows an empty tab title on browsing root \
(/) folder. Dolphin displays the tab title on root (/) folder properly, so this patch \
is a copy of three lines from dolphin dolphinmainwindow.cpp.</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;">compiled and works for me</pre> </td>
</tr>
</table>
<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=153573">153573</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>konqueror/src/konqview.cpp <span style="color: grey">(699c9d5)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101374/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic