File: QStringStdHash.hpp

package info (click to toggle)
qnodeeditor 2.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,144 kB
  • sloc: cpp: 8,823; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once
#include <QtGlobal>
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
// As of 5.14 there is a specialization std::hash<QString>
    #include <QtCore/QString>
    #include <QtCore/QVariant>
    #include <functional>
namespace std
{
    template<>
    struct hash<QString>
    {
        inline std::size_t operator()(QString const &s) const
        {
            return qHash(s);
        }
    };
} // namespace std
#endif