forked from qt-creator/qt-creator
Move FilePath's hash methods to the right header
Change-Id: Ie3932daf381bc03f37ae67722dcddc5b2e4823e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -201,6 +201,11 @@ private:
|
||||
|
||||
using FilePaths = QList<FilePath>;
|
||||
|
||||
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<Utils::FilePath>
|
||||
{
|
||||
using argument_type = Utils::FilePath;
|
||||
using result_type = size_t;
|
||||
result_type operator()(const argument_type &fn) const;
|
||||
};
|
||||
} // namespace std
|
||||
|
@@ -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<Utils::FilePath>
|
||||
{
|
||||
using argument_type = Utils::FilePath;
|
||||
using result_type = size_t;
|
||||
result_type operator()(const argument_type &fn) const;
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
|
Reference in New Issue
Block a user