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:06:32 UTC 2015


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

Review request for KDevelop.


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/f85c8bab/attachment.html>


More information about the KDevelop-devel mailing list