aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QXmppGlobal.cpp8
-rw-r--r--src/QXmppGlobal.h13
2 files changed, 16 insertions, 5 deletions
diff --git a/src/QXmppGlobal.cpp b/src/QXmppGlobal.cpp
index d6459001..e670743d 100644
--- a/src/QXmppGlobal.cpp
+++ b/src/QXmppGlobal.cpp
@@ -24,11 +24,11 @@
#include "QXmppGlobal.h"
-#define QXMPPSTRINGIZE(n) _QXMPPSTRINGIZE(n)
-#define _QXMPPSTRINGIZE(n) #n
-
QString QXmppVersion()
{
- return QString(QXMPPSTRINGIZE(QXMPP_VERSION));
+ return QString("%1.%2.%3").arg(
+ QString::number((QXMPP_VERSION >> 16) & 0xff),
+ QString::number((QXMPP_VERSION >> 8) & 0xff),
+ QString::number(QXMPP_VERSION & 0xff));
}
diff --git a/src/QXmppGlobal.h b/src/QXmppGlobal.h
index 5bba7259..5862eda0 100644
--- a/src/QXmppGlobal.h
+++ b/src/QXmppGlobal.h
@@ -25,7 +25,18 @@
#ifndef QXMPPGLOBAL_H
#define QXMPPGLOBAL_H
-#include "QString"
+#include <QString>
+
+/// This macro expands a numeric value of the form 0xMMNNPP (MM =
+/// major, NN = minor, PP = patch) that specifies QXmpp's version
+/// number. For example, if you compile your application against
+/// QXmpp 1.2.3, the QXMPP_VERSION macro will expand to 0x010203.
+///
+/// You can use QXMPP_VERSION to use the latest QXmpp features where
+/// available.
+///
+
+#define QXMPP_VERSION 0x00025a
QString QXmppVersion();