Review Request 123218: Don't (incorrectly) do a deep copy of the URL in Sublime::UrlDocument::setUrl().

Ivan Shapovalov intelfx100 at gmail.com
Wed Apr 1 22:22:08 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123218/
-----------------------------------------------------------

(Updated April 1, 2015, 10:22 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDevelop.


Changes
-------

Submitted with commit eeaee84fcb17dbb7257020cf8cf2981e0c94fb7a by Ivan Shapovalov to branch master.


Repository: kdevplatform


Description
-------

The Sublime::UrlDocument::setUrl() method somewhy does a "deep copy" of the URL via converting it to a string, converting it to Latin and creating a new URL from that string. The immediate problem is that this method is incorrect and fails when a document is opened at a non-Latin path.

Moreover, I fail to see why it is needed to do such a copy instead of just assigning the QUrl object. The original commit 9560e5 which adds this behavior does not explain it. So remove this logic and use plain assignment — I don't see why it is wrong.


Diffs
-----

  sublime/urldocument.cpp ad5a54d 

Diff: https://git.reviewboard.kde.org/r/123218/diff/


Testing
-------

- unit-tests: no failures in related tests
- manual testing: opening and closing multiple documents


Thanks,

Ivan Shapovalov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150401/bab10bcd/attachment.html>


More information about the KDevelop-devel mailing list