]> sigrok.org Git - pulseview.git/commitdiff
Fix #1542 by providing std::hash<QString> implementation as needed
authorSoeren Apel <redacted>
Tue, 5 May 2020 12:50:29 +0000 (14:50 +0200)
committerSoeren Apel <redacted>
Mon, 11 May 2020 19:23:55 +0000 (21:23 +0200)
pv/data/decode/rowdata.hpp

index ff59d31a0f18d4767f5a3fb946b0a3e839777721..e763302ec41acb26548cc4b71be5a41f39c93505 100644 (file)
@@ -23,6 +23,7 @@
 #include <unordered_map>
 #include <vector>
 
 #include <unordered_map>
 #include <vector>
 
+#include <QtGlobal>
 #include <QHash>
 #include <QString>
 
 #include <QHash>
 #include <QString>
 
@@ -33,6 +34,7 @@
 using std::deque;
 using std::unordered_map;
 
 using std::deque;
 using std::unordered_map;
 
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
 namespace std {
   template<> struct hash<QString> {
     std::size_t operator()(const QString& s) const noexcept {
 namespace std {
   template<> struct hash<QString> {
     std::size_t operator()(const QString& s) const noexcept {
@@ -40,6 +42,7 @@ namespace std {
     }
   };
 }
     }
   };
 }
+#endif
 
 namespace pv {
 namespace data {
 
 namespace pv {
 namespace data {