diff options
Diffstat (limited to 'src/qml/common/qv4compileddata_p.h')
-rw-r--r-- | src/qml/common/qv4compileddata_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h index d46fd58bc8..afb4018c8a 100644 --- a/src/qml/common/qv4compileddata_p.h +++ b/src/qml/common/qv4compileddata_p.h @@ -52,6 +52,7 @@ #include <functional> +#include <QtCore/qhashfunctions.h> #include <QtCore/qstring.h> #include <QtCore/qscopeguard.h> #include <QtCore/qvector.h> @@ -146,6 +147,13 @@ struct Location return line < other.line || (line == other.line && column < other.column); } + + friend size_t qHash(const Location &location, size_t seed = 0) + { + return QT_PREPEND_NAMESPACE(qHash)(location._dummy, seed); + } + + friend bool operator==(const Location &a, const Location &b) { return a._dummy == b._dummy; } }; static_assert(sizeof(Location) == 4, "Location structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); |