[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request: Check if the startDir has an schema before discarting it
From: "Jonathan Marten" <jjm () keelhaul ! me ! uk>
Date: 2012-10-09 8:13:13
Message-ID: 20121009081313.6631.69022 () vidsolbach ! de
[Download RAW message or body]
> On Oct. 4, 2012, 4:28 p.m., Christoph Feck wrote:
> > Causes a regression. When using "Save Image As..." in Konqueror, the fi=
le dialog starts at "Custom Path" (and lists root folder), without remember=
ing the previously used path.
Doing the test as follows appears to work, for both local files and smb:
if (!startDir.directory().isEmpty() ||
(!startDir.scheme().isEmpty() && !startDir.isLocalFile()))
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106475/#review19914
-----------------------------------------------------------
On Sept. 17, 2012, 10:39 a.m., Alex Fiestas wrote:
> =
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106475/
> -----------------------------------------------------------
> =
> (Updated Sept. 17, 2012, 10:39 a.m.)
> =
> =
> Review request for kdelibs and David Faure.
> =
> =
> Description
> -------
> =
> This patch addresses the following bug:
> When an user clicks in a KUrlRequestUrl("smb://") to open the dialog, the=
KFIleDialog will be opened with the "current working dir" instead of smb://
> =
> Debugging the issue, I reached KFileWidget::getStartUrl, in that method t=
here is a check that looks if the directory is not empty, in case it is the=
directory (startDir) is discarded in favor of some magic code that looks f=
or recent folders blablabla.
> =
> this code apparently was added to support the case where an url is compos=
ed only by a fileName, for example when Konqueror Save as (commit 4d3933d4)=
. So the solution I thought is to check if the schema is not empty, in case=
both directory and schema are empty the KUrl will be discarded as well, in=
stead if any of them is not empty the directory will be used.
> =
> =
> Diffs
> -----
> =
> kfile/kfilewidget.cpp 7069a49 =
> =
> Diff: http://git.reviewboard.kde.org/r/106475/diff/
> =
> =
> Testing
> -------
> =
> Used Konqueror (as indicated in the commit) with both khtml and webkit.
> Tested samba-mounter
> Tested bluedevil
> =
> Everything seems to work.
> =
> =
> Thanks,
> =
> Alex Fiestas
> =
>
[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/106475/">http://git.reviewboard.kde.org/r/106475/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On October 4th, 2012, 4:28 p.m., <b>Christoph \
Feck</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;">Causes a regression. When using "Save Image As..." in \
Konqueror, the file dialog starts at "Custom Path" (and lists root folder), \
without remembering the previously used path.</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;">Doing the test as \
follows appears to work, for both local files and smb:
if (!startDir.directory().isEmpty() ||
(!startDir.scheme().isEmpty() && !startDir.isLocalFile()))
</pre>
<br />
<p>- Jonathan</p>
<br />
<p>On September 17th, 2012, 10:39 a.m., Alex Fiestas 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 kdelibs and David Faure.</div>
<div>By Alex Fiestas.</div>
<p style="color: grey;"><i>Updated Sept. 17, 2012, 10:39 a.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;">This patch addresses the following bug: When an user clicks in a \
KUrlRequestUrl("smb://") to open the dialog, the KFIleDialog will be opened \
with the "current working dir" instead of smb://
Debugging the issue, I reached KFileWidget::getStartUrl, in that method there is a \
check that looks if the directory is not empty, in case it is the directory \
(startDir) is discarded in favor of some magic code that looks for recent folders \
blablabla.
this code apparently was added to support the case where an url is composed only by a \
fileName, for example when Konqueror Save as (commit 4d3933d4). So the solution I \
thought is to check if the schema is not empty, in case both directory and schema are \
empty the KUrl will be discarded as well, instead if any of them is not empty the \
directory will be used.</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;">Used Konqueror (as indicated in the commit) with both khtml and webkit. \
Tested samba-mounter Tested bluedevil
Everything seems to work.</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">(7069a49)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/106475/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