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:09:27 (GMT)
commit70429c33f0687afd489e1055bc0e1f1f340e13b9 (patch)
tree4917de9c58c45bab4d7561a560cc11c469a6ff98 /tests/auto/network-settings.h
parentac70ce3f2598f0f3aae64c2e39c580375fd62df0 (diff)
downloadQt-70429c33f0687afd489e1055bc0e1f1f340e13b9.zip
Qt-70429c33f0687afd489e1055bc0e1f1f340e13b9.tar.gz
Qt-70429c33f0687afd489e1055bc0e1f1f340e13b9.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
+
};