diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-03 14:09:08 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-11 11:02:16 +0200 |
commit | 1b960119313baa6762f02fa31996796fe17d71fc (patch) | |
tree | 2513418f5e3a0e0dc7f233164e92d9e9fe97f555 | |
parent | 4bf3a4f645e721fce6a4471bde8eed884319cccf (diff) |
Avoid compile error
It was trying to cast a QStringBuilder to QVariant. That only works via
explicit conversion to QString.
Change-Id: I2785e4c6ad0d5cc10fa301ae131019cf11a8931b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r-- | src/imports/opcua/opcuaserverdiscovery.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/opcua/opcuaserverdiscovery.cpp b/src/imports/opcua/opcuaserverdiscovery.cpp index ffa539d..884f4b1 100644 --- a/src/imports/opcua/opcuaserverdiscovery.cpp +++ b/src/imports/opcua/opcuaserverdiscovery.cpp @@ -230,7 +230,7 @@ void OpcUaServerDiscovery::handleServers(const QList<QOpcUaApplicationDescriptio for (const auto &i : qAsConst(servers)) { const int newRow = QStandardItemModel::rowCount(); QStandardItemModel::insertRow(newRow); - QStandardItemModel::setData(index(newRow, 0), i.applicationUri() + QLatin1String("\n") + i.productUri(), Qt::DisplayRole); + QStandardItemModel::setData(index(newRow, 0), QString(i.applicationUri() + u'\n' + i.productUri()), Qt::DisplayRole); QStandardItemModel::setData(index(newRow, 0), QVariant::fromValue(i), Qt::UserRole); } emit countChanged(); |