Utils: Use FilePath hash in operator==

Change-Id: Ibbea420a5a5353da221d285b70272cdf9b09d0d0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-05-12 13:33:45 +02:00
parent 6149fd8bfa
commit 69fbe72752

View File

@@ -2042,6 +2042,9 @@ DeviceFileHooks &DeviceFileHooks::instance()
QTCREATOR_UTILS_EXPORT bool operator==(const FilePath &first, const FilePath &second) QTCREATOR_UTILS_EXPORT bool operator==(const FilePath &first, const FilePath &second)
{ {
if (first.m_hash != 0 && second.m_hash != 0 && first.m_hash != second.m_hash)
return false;
return first.pathView().compare(second.pathView(), first.caseSensitivity()) == 0 return first.pathView().compare(second.pathView(), first.caseSensitivity()) == 0
&& first.host() == second.host() && first.host() == second.host()
&& first.scheme() == second.scheme(); && first.scheme() == second.scheme();