aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-09-04 15:11:24 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-09-04 15:11:24 +0200
commit77782aecceb4ea7885d50f61afb8b2cae554960b (patch)
treec70eb1b4e94ecc7dc5cebbd75804a8ea503bc90c /src
parentce72f29bfeb150e740c3b0b1175c43bffce9d4e9 (diff)
downloadqxmpp-77782aecceb4ea7885d50f61afb8b2cae554960b.tar.gz
If building with Qt 5, use Qt's QDnsLookup instead of our backport.
Diffstat (limited to 'src')
-rw-r--r--src/base/base.pri16
-rw-r--r--src/client/QXmppOutgoingClient.cpp4
-rw-r--r--src/server/QXmppOutgoingServer.cpp4
3 files changed, 17 insertions, 7 deletions
diff --git a/src/base/base.pri b/src/base/base.pri
index 21785c71..6461bc79 100644
--- a/src/base/base.pri
+++ b/src/base/base.pri
@@ -1,7 +1,5 @@
# Header files
INSTALL_HEADERS += \
- base/qdnslookup.h \
- base/qdnslookup_p.h \
base/QXmppArchiveIq.h \
base/QXmppBindIq.h \
base/QXmppBookmarkSet.h \
@@ -83,8 +81,12 @@ SOURCES += \
base/QXmppVersionIq.cpp
# DNS
-SOURCES += base/qdnslookup.cpp
-android:SOURCES += base/qdnslookup_stub.cpp
-else:symbian:SOURCES += base/qdnslookup_symbian.cpp
-else:unix:SOURCES += base/qdnslookup_unix.cpp
-else:win32:SOURCES += base/qdnslookup_win.cpp
+qt_version = $$QT_MAJOR_VERSION
+contains(qt_version, 4) {
+ INSTALL_HEADERS += base/qdnslookup.h base/qdnslookup_p.h
+ SOURCES += base/qdnslookup.cpp
+ android:SOURCES += base/qdnslookup_stub.cpp
+ else:symbian:SOURCES += base/qdnslookup_symbian.cpp
+ else:unix:SOURCES += base/qdnslookup_unix.cpp
+ else:win32:SOURCES += base/qdnslookup_win.cpp
+}
diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp
index 1298c593..6f84d090 100644
--- a/src/client/QXmppOutgoingClient.cpp
+++ b/src/client/QXmppOutgoingClient.cpp
@@ -26,7 +26,11 @@
#include <QNetworkProxy>
#include <QSslSocket>
#include <QUrl>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#include <QDnsLookup>
+#else
#include "qdnslookup.h"
+#endif
#include "QXmppConfiguration.h"
#include "QXmppConstants.h"
diff --git a/src/server/QXmppOutgoingServer.cpp b/src/server/QXmppOutgoingServer.cpp
index 3101bced..77315e8b 100644
--- a/src/server/QXmppOutgoingServer.cpp
+++ b/src/server/QXmppOutgoingServer.cpp
@@ -25,7 +25,11 @@
#include <QSslKey>
#include <QSslSocket>
#include <QTimer>
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#include <QDnsLookup>
+#else
#include "qdnslookup.h"
+#endif
#include "QXmppConstants.h"
#include "QXmppDialback.h"