diff --git a/src/libs/utils/filepath.h b/src/libs/utils/filepath.h index 21ef3e12438..474f2c1416c 100644 --- a/src/libs/utils/filepath.h +++ b/src/libs/utils/filepath.h @@ -201,6 +201,11 @@ private: using FilePaths = QList; +inline uint qHash(const Utils::FilePath &a, uint seed = 0) +{ + return a.hash(seed); +} + } // namespace Utils QT_BEGIN_NAMESPACE @@ -208,3 +213,13 @@ QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug dbg, const Utils::FilePath &c); QT_END_NAMESPACE Q_DECLARE_METATYPE(Utils::FilePath) + +namespace std { +template<> +struct QTCREATOR_UTILS_EXPORT hash +{ + using argument_type = Utils::FilePath; + using result_type = size_t; + result_type operator()(const argument_type &fn) const; +}; +} // namespace std diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h index 9fd0b6c2a03..c87ca5d5dd0 100644 --- a/src/libs/utils/fileutils.h +++ b/src/libs/utils/fileutils.h @@ -316,16 +316,5 @@ private: QTCREATOR_UTILS_EXPORT QTextStream &operator<<(QTextStream &s, const FilePath &fn); -inline uint qHash(const Utils::FilePath &a, uint seed = 0) { return a.hash(seed); } - } // namespace Utils -namespace std { -template<> struct QTCREATOR_UTILS_EXPORT hash -{ - using argument_type = Utils::FilePath; - using result_type = size_t; - result_type operator()(const argument_type &fn) const; -}; -} // namespace std -