common: Disable enum type stream operators for Qt >= 5.14
[quassel.git] / src / common / types.h
index 0816223..e2a9aab 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2018 by the Quassel Project                        *
+ *   Copyright (C) 2005-2019 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -195,6 +195,7 @@ Q_DECLARE_METATYPE(QHostAddress)
 using MsgIdList = QList<MsgId>;
 using BufferIdList = QList<BufferId>;
 
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
 /**
  * Catch-all stream serialization operator for enum types.
  *
@@ -224,6 +225,7 @@ QDataStream& operator>>(QDataStream& in, T& value)
     value = static_cast<T>(v);
     return in;
 }
+#endif
 
 // STL-compliant hash functor for Qt types
 template<typename T>