D19027: Fix "Invalid URL: QUrl("some.txt")" warnings in Save dialog

David Faure noreply at phabricator.kde.org
Sun Mar 3 08:48:05 GMT 2019


dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.


  oops sorry forgot to submit my comments earlier

INLINE COMMENTS

> kfilewidget.cpp:792
>          } else {
>              u = QUrl(url); // keep it relative
> +            if (u.isRelative()) {

This comment is no longer true, is it?
We won't keep it relative, we'll instead make it absolute, just below.

> kfilewidget.cpp:794
> +            if (u.isRelative()) {
> +                // no scheme, assume local file path.
> +                u = relativeUrlTest;

That's not what the code does, is it?
relativeUrlTest is relative to ops->url(), which might not be local.

The code looks fine, the comment looks wrong and confusing.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D19027

To: Lekensteyn, ngraham, dfaure, fvogt, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190303/b2533356/attachment.html>


More information about the Kde-frameworks-devel mailing list