diff --git a/src/track/trackfile.h b/src/track/trackfile.h index c5b1c114e890..96c73f4a3aab 100644 --- a/src/track/trackfile.h +++ b/src/track/trackfile.h @@ -123,3 +123,7 @@ inline QDebug operator<<(QDebug debug, const TrackFile& trackFile) { return debug << trackFile.location(); #endif } + +inline uint qHash(const TrackFile& key, uint seed) { + return qHash(key.location(), seed); +} diff --git a/src/track/trackref.h b/src/track/trackref.h index 647d62136f83..7a60e045cef3 100644 --- a/src/track/trackref.h +++ b/src/track/trackref.h @@ -115,3 +115,7 @@ Q_DECLARE_METATYPE(TrackRef) std::ostream& operator<<(std::ostream& os, const TrackRef& trackRef); QDebug operator<<(QDebug debug, const TrackRef& trackRef); + +inline uint qHash(const TrackRef& key, uint seed) { + return qHash(key.getLocation(), seed) ^ qHash(key.getId(), seed); +}