summaryrefslogtreecommitdiffhomepage
path: root/compat/qhash.hpp
blob: 507b612e4f135b1bab764b5f4c861591f35e7717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <QtGlobal>
#include <QString>
#include <QHashFunctions>

// Qt < 5.14.0
#ifndef QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF

namespace std {
template<> struct hash<QString>
{
    unsigned operator()(const QString& value) const
    {
        return qHash(value);
    }
};
}

#endif