Merge pull request #657 from daleglass/fix-build-on-qt-5.14

Fix build on qt 5.14
This commit is contained in:
kasenvr 2020-09-24 17:11:42 -04:00 committed by GitHub
commit 1c818bc8eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 0 deletions

View file

@ -14,7 +14,10 @@
#include <queue> #include <queue>
#if !defined(Q_MOC_RUN)
// Work around https://bugreports.qt.io/browse/QTBUG-80990
#include <tbb/concurrent_vector.h> #include <tbb/concurrent_vector.h>
#endif
#include <QtCore/QJsonObject> #include <QtCore/QJsonObject>

View file

@ -12,7 +12,10 @@
#ifndef hifi_AudioMixerSlave_h #ifndef hifi_AudioMixerSlave_h
#define hifi_AudioMixerSlave_h #define hifi_AudioMixerSlave_h
#if !defined(Q_MOC_RUN)
// Work around https://bugreports.qt.io/browse/QTBUG-80990
#include <tbb/concurrent_vector.h> #include <tbb/concurrent_vector.h>
#endif
#include <AABox.h> #include <AABox.h>
#include <AudioHRTF.h> #include <AudioHRTF.h>

View file

@ -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;

View file

@ -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> {

View file

@ -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

View file

@ -15,12 +15,15 @@
#pragma warning( disable : 4334 ) #pragma warning( disable : 4334 )
#endif #endif
#if !defined(Q_MOC_RUN)
// Work around https://bugreports.qt.io/browse/QTBUG-80990
#include <tbb/concurrent_queue.h> #include <tbb/concurrent_queue.h>
#include <tbb/concurrent_unordered_map.h> #include <tbb/concurrent_unordered_map.h>
#include <tbb/concurrent_unordered_set.h> #include <tbb/concurrent_unordered_set.h>
#include <tbb/concurrent_vector.h> #include <tbb/concurrent_vector.h>
#include <tbb/parallel_for.h> #include <tbb/parallel_for.h>
#include <tbb/blocked_range2d.h> #include <tbb/blocked_range2d.h>
#endif
#ifdef _WIN32 #ifdef _WIN32
#pragma warning( pop ) #pragma warning( pop )