aboutsummaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-04-01 16:36:38 +0200
committerLinus Jahn <lnj@kaidan.im>2020-04-01 16:38:37 +0200
commit4c9b06545afee50b84bfae7a27bbe3dd48cc749a (patch)
tree976fcfe8988e76c0dc1996c7a52b1533fee83a2a /src/base
parent4a09a18ff1d786c5fdea7b1992f6937fa7cbc833 (diff)
downloadqxmpp-4c9b06545afee50b84bfae7a27bbe3dd48cc749a.tar.gz
Fix build with Qt 5.14
Q_DEPRECATED_X() can't be used on enum values anymore. The new Q_DECL_ENUMERATOR_DEPRECATED_X() can be uesd instead, this is only available since Qt 5.12, so I needed to define an empty fallback for it.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/QXmppGlobal.h.in7
-rw-r--r--src/base/QXmppStanza.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/base/QXmppGlobal.h.in b/src/base/QXmppGlobal.h.in
index fa4736f4..a4860d06 100644
--- a/src/base/QXmppGlobal.h.in
+++ b/src/base/QXmppGlobal.h.in
@@ -62,5 +62,10 @@ inline QLatin1String QXmppVersion()
// This works exactly like QT_DEPRECATED_SINCE, but checks QXMPP_DISABLE_DEPRECATED_BEFORE instead.
#define QXMPP_DEPRECATED_SINCE(major, minor) (QT_VERSION_CHECK(major, minor, 0) > QXMPP_DISABLE_DEPRECATED_BEFORE)
-#endif //QXMPPGLOBAL_H
+// workaround for Qt < 5.12
+#ifndef Q_DECL_ENUMERATOR_DEPRECATED_X
+#define Q_DECL_ENUMERATOR_DEPRECATED_X(msg)
+#endif
+
+#endif // QXMPPGLOBAL_H
diff --git a/src/base/QXmppStanza.h b/src/base/QXmppStanza.h
index 8eb1b47a..9bbc9634 100644
--- a/src/base/QXmppStanza.h
+++ b/src/base/QXmppStanza.h
@@ -133,7 +133,7 @@ public:
#if QXMPP_DEPRECATED_SINCE(1, 3)
/// Payment is required to perform the request.
/// \deprecated This error condition is deprecated since QXmpp 1.3 as it was not adopted in RFC6120.
- QT_DEPRECATED_X("The <payment-required/> error was removed in RFC6120") PaymentRequired,
+ PaymentRequired Q_DECL_ENUMERATOR_DEPRECATED_X("The <payment-required/> error was removed in RFC6120"),
#endif
RecipientUnavailable = 12, ///< The recipient is unavailable.
Redirect, ///< The requested resource is available elsewhere. This is used in combination with a redirection URI.