diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-11-18 09:19:12 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-11-24 10:10:42 +0000 |
commit | 5995810d341b22ff20f3350b851f55a856d87aae (patch) | |
tree | ddaf0ab2d13046c5e2d7242fc1260a4b803e4f96 /src/libs | |
parent | 3d492c47e76e67634a66ef90c1754e5e0f0d49f8 (diff) |
FilePath: optimize comparison
* The QTC_ASSERT in pathView() is quite expensive
* Constructing the scheme using scheme() is not required
Change-Id: Ibea33dd6abf67c8bd184d118f23e2598075c362c
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit e47141753995f91565f8e3781315b40fe620d16c)
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/utils/filepath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 44aa572757..75fba81867 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1346,7 +1346,7 @@ bool FilePath::isNewerThan(const QDateTime &timeStamp) const */ Qt::CaseSensitivity FilePath::caseSensitivity() const { - if (scheme().isEmpty()) + if (m_schemeLen == 0) return HostOsInfo::fileNameCaseSensitivity(); // FIXME: This could or possibly should the target device's file name case sensitivity |