summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJannis Voelker <jannis.voelker@basyskom.com>2019-01-11 09:35:43 +0100
committerJannis Völker <jannis.voelker@basyskom.com>2019-01-11 13:46:20 +0000
commit05022007770b087b2632568fcf061053f3924dcb (patch)
tree0f1fba90ba738ebb2846f4c2c9fe23e5864daa40 /examples
parent0a2e60908577e56caf3c4d94ebd5492f2eb828e3 (diff)
opcuaviewer: List all discovery endpoint URLs of each server
If only the first endpoint URL is used, a server with https support may only be listed as https. Change-Id: I22c6fe9eabeb9aed956a0e934d974092198249f3 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/opcua/opcuaviewer/mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/opcua/opcuaviewer/mainwindow.cpp b/examples/opcua/opcuaviewer/mainwindow.cpp
index c995e1c..c6f9d0a 100644
--- a/examples/opcua/opcuaviewer/mainwindow.cpp
+++ b/examples/opcua/opcuaviewer/mainwindow.cpp
@@ -258,8 +258,8 @@ void MainWindow::findServersComplete(const QVector<QOpcUa::QApplicationDescripti
mServers->clear();
for (const auto &server : servers) {
QVector<QString> urls = server.discoveryUrls();
- if (urls.length() > 0)
- mServers->addItem(urls[0]);
+ for (const auto &url : qAsConst(urls))
+ mServers->addItem(url);
}
}