Fix support for extended features on Qt4
authorJanne Koschinski <janne@kuschku.de>
Wed, 11 Apr 2018 01:16:21 +0000 (03:16 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 26 Apr 2018 21:55:30 +0000 (23:55 +0200)
- On Qt4, Q_ENUMS can *not* handle enum class, but only enum
- This patch adds an #ifdef to only use enum class on Qt5

Closes GH-352.

src/common/quassel.h

index 135e8b5..87d525f 100644 (file)
@@ -111,7 +111,11 @@ public:
      *
      * This list should be cleaned up after every protocol break, as we can assume them to be present then.
      */
-    enum class Feature : quint32 {
+    #if QT_VERSION >= 0x050000
+    enum class Feature : uint32_t {
+    #else
+    enum Feature {
+    #endif
         SynchronizedMarkerLine,
         SaslAuthentication,
         SaslExternal,