summaryrefslogtreecommitdiffstats
path: root/tests/auto/network-settings.h
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-05-19 13:06:46 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-05-19 13:11:39 (GMT)
commit07e5f5f3b3b1936c5f5090b02cc2c02e344822b5 (patch)
treee9570f82488955fc677eaeae03dbde7594cb95db /tests/auto/network-settings.h
parent879d5cf234bb06657b67a39969ea16d68f79fbeb (diff)
downloadQt-07e5f5f3b3b1936c5f5090b02cc2c02e344822b5.zip
Qt-07e5f5f3b3b1936c5f5090b02cc2c02e344822b5.tar.gz
Qt-07e5f5f3b3b1936c5f5090b02cc2c02e344822b5.tar.bz2
Adpot more code to use QtNetworkSettings instead of hard coded names.
Reviewed-By: Peter Hartmann
Diffstat (limited to 'tests/auto/network-settings.h')
-rw-r--r--tests/auto/network-settings.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index b2a449a..5a2f9c3 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -39,6 +39,7 @@
**
****************************************************************************/
#include <QString>
+#include <QtNetwork/QHostInfo>
class QtNetworkSettings
{
@@ -63,4 +64,12 @@ public:
{
return "qt-test-server.wildcard.dev." + serverDomainName();
}
+
+#ifdef QT_NETWORK_LIB
+ static QHostAddress serverIP()
+ {
+ return QHostInfo::fromName(serverName()).addresses().first();
+ }
+#endif
+
};