Change return type of qHash with Qt 6 to size_t

This commit is contained in:
Jonas Kvinge
2020-11-17 01:22:38 +01:00
parent 4dcae4ce21
commit 042da74955
8 changed files with 33 additions and 1 deletions

View File

@@ -1500,7 +1500,11 @@ bool Song::operator!=(const Song &other) const {
return source() != other.source() || url() != other.url() || beginning_nanosec() != other.beginning_nanosec();
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
size_t qHash(const Song &song) {
#else
uint qHash(const Song &song) {
#endif
// Should compare the same fields as operator==
return qHash(song.url().toString()) ^ qHash(song.beginning_nanosec());
}