Skip to content
Permalink
Browse files

qt: don't define std::hash<QString> for qt >= 5.14

the hashes were defined in qtbase.git 4469e36d7203a55a4e158a50f0e9effc3f2fa3c2.
  • Loading branch information
TheJJ committed Dec 22, 2019
1 parent f6f42b0 commit 663b1158018d839eb5cfed63f4b228c1590c6104
Showing with 6 additions and 2 deletions.
  1. +6 −2 libopenage/gui/guisys/private/livereload/gui_live_reloader.h
@@ -1,4 +1,4 @@
// Copyright 2015-2016 the openage authors. See copying.md for legal info.
// Copyright 2015-2019 the openage authors. See copying.md for legal info.

#pragma once

@@ -9,16 +9,20 @@
#include <QStringList>
#include <QHash>
#include <QList>
#include <QtGlobal>
#include <QtQml>

// since qt 5.14, the std::hash of q* types are included in qt
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
namespace std {
template<>
struct hash<QString> {
size_t operator()(const QString& val) const throw () {
size_t operator()(const QString& val) const noexcept {
return qHash(val);
}
};
}
#endif

namespace qtsdl {

0 comments on commit 663b115

Please sign in to comment.
You can’t perform that action at this time.