summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-11 06:06:36 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-11 06:06:36 (GMT)
commit5b80fbad54eccfc79f38c4f24d6267834b23e742 (patch)
tree3f79df094e466fe61e0fe8783275396ad0553475 /tests/auto/network-settings.h
parent43d7bec69c7eb42b2c86d3f3b716245e069865e9 (diff)
downloadQt-5b80fbad54eccfc79f38c4f24d6267834b23e742.zip
Qt-5b80fbad54eccfc79f38c4f24d6267834b23e742.tar.gz
Qt-5b80fbad54eccfc79f38c4f24d6267834b23e742.tar.bz2
Unified QtNetworkSettings:severIP return type for all platforms.
This commit fixes the following autotest case build breaks on windows when compiling QtS60 sources: - q3socket - q3socketdevice - qhostinfo - qsocks5socketengine
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r--tests/auto/network-settings.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 9488fda..9b67910 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -37,12 +37,10 @@
**
****************************************************************************/
#include <QString>
-
-/*
#ifdef QT_NETWORK_LIB
#include <QtNetwork/QHostInfo>
#endif
-*/
+
#ifdef Q_OS_SYMBIAN
#include <sys/socket.h>
@@ -131,7 +129,9 @@ public:
//return "qt-test-server.wildcard.dev." + serverDomainName();
return "qttest.wildcard.dev." + serverDomainName();
}
- static const char *serverIP()
+
+#ifdef QT_NETWORK_LIB
+ static QHostAddress serverIP()
{
#ifdef Q_OS_SYMBIAN
loadTestSettings();
@@ -141,12 +141,13 @@ public:
if(serverIp.isNull()) {
serverIp = entry->recordValue().toAscii();
}
- return serverIp.data();
+ return QHostAddress(serverIp.data());
}
-#endif
- return "10.10.14.172";
+#endif
+ return QHostInfo::fromName(serverName()).addresses().first();
}
-
+#endif
+
static QByteArray expectedReplyIMAP()
{
#ifdef Q_OS_SYMBIAN
@@ -315,14 +316,6 @@ private:
}
#endif
-/*
-#ifdef QT_NETWORK_LIB
- static QHostAddress serverIP()
- {
- return QHostInfo::fromName(serverName()).addresses().first();
- }
-#endif
-*/
};
#ifdef Q_OS_SYMBIAN