mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:27:04 +02:00
Fix build under Qt 5.14 and later.
Solves "redefinition of ‘struct std::hash<QString>’", "redefinition of ‘struct std::hash<QByteArray>'", and a build failure in TouchscreenVirtualPadDevice.h.
This commit is contained in:
parent
3d8128cc08
commit
61a159034c
3 changed files with 9 additions and 0 deletions
|
@ -15,7 +15,12 @@
|
||||||
#include <controllers/InputDevice.h>
|
#include <controllers/InputDevice.h>
|
||||||
#include "InputPlugin.h"
|
#include "InputPlugin.h"
|
||||||
#include <QtGui/qtouchdevice.h>
|
#include <QtGui/qtouchdevice.h>
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||||
#include <QtGui/QList>
|
#include <QtGui/QList>
|
||||||
|
#else
|
||||||
|
#include <QTouchEvent>
|
||||||
|
#include <QtCore/QList>
|
||||||
|
#endif
|
||||||
#include "VirtualPadManager.h"
|
#include "VirtualPadManager.h"
|
||||||
|
|
||||||
class QTouchEvent;
|
class QTouchEvent;
|
||||||
|
|
|
@ -223,12 +223,14 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||||
template <>
|
template <>
|
||||||
struct hash<QByteArray> {
|
struct hash<QByteArray> {
|
||||||
size_t operator()(const QByteArray& byteArray) const {
|
size_t operator()(const QByteArray& byteArray) const {
|
||||||
return qHash(byteArray);
|
return qHash(byteArray);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct hash<TextureExtra> {
|
struct hash<TextureExtra> {
|
||||||
|
|
|
@ -597,12 +597,14 @@ namespace std {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||||
template <>
|
template <>
|
||||||
struct hash<QString> {
|
struct hash<QString> {
|
||||||
size_t operator()(const QString& a) const {
|
size_t operator()(const QString& a) const {
|
||||||
return qHash(a);
|
return qHash(a);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
|
Loading…
Reference in a new issue