summaryrefslogtreecommitdiffstats
path: root/examples/network/threadedfortuneserver/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/threadedfortuneserver/dialog.cpp')
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/network/threadedfortuneserver/dialog.cpp b/examples/network/threadedfortuneserver/dialog.cpp
index b1ea395..d0d3fc0 100644
--- a/examples/network/threadedfortuneserver/dialog.cpp
+++ b/examples/network/threadedfortuneserver/dialog.cpp
@@ -67,8 +67,10 @@ Dialog::Dialog(QWidget *parent)
// use the first non-localhost IPv4 address
for (int i = 0; i < ipAddressesList.size(); ++i) {
if (ipAddressesList.at(i) != QHostAddress::LocalHost &&
- ipAddressesList.at(i).toIPv4Address())
+ ipAddressesList.at(i).toIPv4Address()) {
ipAddress = ipAddressesList.at(i).toString();
+ break;
+ }
}
// if we did not find one, use IPv4 localhost
if (ipAddress.isEmpty())