aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/Doxyfile.in4
-rw-r--r--src/base/QXmppGlobal.h.in10
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 97a4e1de..b5765cd0 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -13,3 +13,7 @@ GENERATE_LATEX = NO
HTML_TIMESTAMP = NO
QUIET = YES
RECURSIVE = YES
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+PREDEFINED = "QXMPP_DEPRECATED_SINCE(major, minor)="
diff --git a/src/base/QXmppGlobal.h.in b/src/base/QXmppGlobal.h.in
index f562eb04..992e02b1 100644
--- a/src/base/QXmppGlobal.h.in
+++ b/src/base/QXmppGlobal.h.in
@@ -4,6 +4,7 @@
* Author:
* Manjeet Dahiya
* Niels Ole Salscheider
+ * Linus Jahn
*
* Source:
* https://github.com/qxmpp-project/qxmpp
@@ -52,5 +53,14 @@ inline QLatin1String QXmppVersion()
return QLatin1String("@VERSION_STRING@");
}
+// This sets which deprecated functions should still be usable
+// It works exactly like QT_DISABLE_DEPRECATED_BEFORE
+#ifndef QXMPP_DISABLE_DEPRECATED_BEFORE
+# define QXMPP_DISABLE_DEPRECATED_BEFORE 0x@VERSION_MAJOR@ << 16
+#endif
+
+// 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