D8953: Make VcsLocation also implicitly shared
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Fri Nov 24 12:41:42 UTC 2017
kossebau added a comment.
While OT for the content in this patch, yet a small reply:
In https://phabricator.kde.org/D8953#171486, @aaronpuchert wrote:
> I think that either the method or the standalone function should go away, but which one? Right now the standalone function is used for the `QHash<VcsLocation,QByteArray>` members in `VcsDiffPrivate`, the method doesn't seem to be used at all. (Removing the implementation doesn't produce linker errors for me.) However, the implementation of the member `operator==` looks "more correct."
The non-member one might have been done exactly for the usage with the hash in VcsDiff (the qHash method for VcsLocation also only cares for the same subset of properties). I suspect the usage of the class for the hashmap might be a small abuse though, it could need another separate class designed for that very purpose, not sure yet. Then, my recent separate clean-up patch https://phabricator.kde.org/R32:36fd6bf0f877eaf491cdfbafcd0a9e86e743f764 has removed those hashmaps, so the usage scope of VcsLocation has been reduced and enables a more clear definition of its API by the remaining usage (already waiting in my local patch sets).
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D8953
To: kossebau, #kdevelop
Cc: aaronpuchert, mwolff, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171124/05a6e7d3/attachment.html>
More information about the KDevelop-devel
mailing list