summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-11-20 15:56:49 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-11-20 15:56:49 +0200
commite060a0990380134c054bde675d47db048fd3192f (patch)
tree4f896f0c3655619ddb9e93e094ffb832f6f67b30
parentaa61cc683979ea1413222e64a03aae9971392e3d (diff)
parente006bf7ec70e4e1617810667f992aa3f9b01cd0f (diff)
Merge tag 'v5.15.17-lts' into tqtc/lts-5.15-opensourcev5.15.17-lts-lgpl5.15
Qt 5.15.17-lts release Change-Id: I9879cb43c3d19df873540a4736069c488adb0049
-rw-r--r--.qmake.conf2
-rw-r--r--src/remoteobjects/qconnection_tcpip_backend.cpp17
-rw-r--r--src/remoteobjects/qremoteobjectreplica.cpp6
3 files changed, 14 insertions, 11 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 9732a12..783d358 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -4,6 +4,6 @@ CONFIG += qt_example_installs
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 5.15.16
+MODULE_VERSION = 5.15.17
QTRO_SOURCE_TREE = $$PWD
diff --git a/src/remoteobjects/qconnection_tcpip_backend.cpp b/src/remoteobjects/qconnection_tcpip_backend.cpp
index 42b3d85..f99ee9e 100644
--- a/src/remoteobjects/qconnection_tcpip_backend.cpp
+++ b/src/remoteobjects/qconnection_tcpip_backend.cpp
@@ -81,14 +81,15 @@ void TcpClientIo::connectToServer()
{
if (isOpen())
return;
- QHostAddress address(url().host());
- if (address.isNull()) {
- const QList<QHostAddress> addresses = QHostInfo::fromName(url().host()).addresses();
- Q_ASSERT_X(addresses.size() >= 1, Q_FUNC_INFO, url().toString().toLatin1().data());
- address = addresses.first();
- }
-
- m_socket->connectToHost(address, url().port());
+ const QString &host = url().host();
+ QHostAddress address(host);
+ if (address.isNull())
+ address = QHostInfo::fromName(host).addresses().value(0);
+
+ if (address.isNull())
+ qWarning("connectToServer(): Failed to resolve host %s", qUtf8Printable(host));
+ else
+ m_socket->connectToHost(address, url().port());
}
bool TcpClientIo::isOpen() const
diff --git a/src/remoteobjects/qremoteobjectreplica.cpp b/src/remoteobjects/qremoteobjectreplica.cpp
index ddfe3ec..4eae1e9 100644
--- a/src/remoteobjects/qremoteobjectreplica.cpp
+++ b/src/remoteobjects/qremoteobjectreplica.cpp
@@ -146,8 +146,10 @@ QConnectedReplicaImplementation::~QConnectedReplicaImplementation()
sendCommand();
}
for (auto prop : m_propertyStorage) {
- if (prop.canConvert<QObject*>())
- prop.value<QObject *>()->deleteLater();
+ if (prop.canConvert<QObject*>()) {
+ if (auto o = prop.value<QObject*>())
+ o->deleteLater();
+ }
}
}