diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-03 07:03:32 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-03 07:03:32 +0100 |
commit | e35bbf630997db9bd646e8c0aa09a7953044f0cc (patch) | |
tree | b3734a147a8f07e0d17986f278f9b5cfb64d45c6 | |
parent | f4262ca4b906816578be780ab0d25e592b566957 (diff) | |
parent | 1d95be3c4a36b2e369b4ba3171581f0a7d5095ba (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
tests/auto/auto.pro
Change-Id: I628deb6c3b8c36c24e228274b4e3d3e1c8cf7bce
-rw-r--r-- | src/remoteobjects/qconnection_tcpip_backend.cpp | 2 | ||||
-rw-r--r-- | src/remoteobjects/qremoteobjectnode.cpp | 13 | ||||
-rw-r--r-- | src/remoteobjects/qremoteobjectregistry.cpp | 4 | ||||
-rw-r--r-- | tests/auto/auto.pro | 4 | ||||
-rw-r--r-- | tests/auto/repc/signature/signature.pro | 5 |
5 files changed, 18 insertions, 10 deletions
diff --git a/src/remoteobjects/qconnection_tcpip_backend.cpp b/src/remoteobjects/qconnection_tcpip_backend.cpp index 872dbbf..050cfb3 100644 --- a/src/remoteobjects/qconnection_tcpip_backend.cpp +++ b/src/remoteobjects/qconnection_tcpip_backend.cpp @@ -182,7 +182,7 @@ bool TcpServerImpl::listen(const QUrl &address) if (info.addresses().isEmpty()) host = QHostAddress::Any; else - host = info.addresses().takeFirst(); + host = info.addresses().constFirst(); } } diff --git a/src/remoteobjects/qremoteobjectnode.cpp b/src/remoteobjects/qremoteobjectnode.cpp index b8eac7f..6d3ac9e 100644 --- a/src/remoteobjects/qremoteobjectnode.cpp +++ b/src/remoteobjects/qremoteobjectnode.cpp @@ -285,7 +285,7 @@ void QRemoteObjectNodePrivate::openConnectionIfNeeded(const QString &name) return; } - if (!initConnection(remoteObjectAddresses()[name].hostUrl)) + if (!initConnection(remoteObjectAddresses().value(name).hostUrl)) qROPrivWarning() << "failed to open connection to" << name; } @@ -424,9 +424,14 @@ QReplicaPrivateInterface *QRemoteObjectNodePrivate::handleNewAcquire(const QMeta rp->setConnection(connectedSources[name].device); else rp->setState(QRemoteObjectReplica::SignatureMismatch); - } else if (remoteObjectAddresses().contains(name)) { //No existing connection, but we know we can connect via registry - initConnection(remoteObjectAddresses()[name].hostUrl); //This will try the connection, and if successful, the remoteObjects will be sent - //The link to the replica will be handled then + } else { + //No existing connection, but we know we can connect via registry + const auto &sourceLocations = remoteObjectAddresses(); + const auto it = sourceLocations.constFind(name); + // This will try the connection, and if successful, the remoteObjects will be sent + // The link to the replica will be handled then + if (it != sourceLocations.constEnd()) + initConnection(it.value().hostUrl); } return rp; } diff --git a/src/remoteobjects/qremoteobjectregistry.cpp b/src/remoteobjects/qremoteobjectregistry.cpp index 4a5272a..f226f57 100644 --- a/src/remoteobjects/qremoteobjectregistry.cpp +++ b/src/remoteobjects/qremoteobjectregistry.cpp @@ -149,7 +149,7 @@ void QRemoteObjectRegistry::addSource(const QRemoteObjectSourceLocation &entry) if (sourceLocations().contains(entry.first)) { qCWarning(QT_REMOTEOBJECT) << "Node warning: ignoring source" << entry.first - << "as another source (" << sourceLocations()[entry.first] + << "as another source (" << sourceLocations().value(entry.first) << ") has already registered that name."; return; } @@ -197,7 +197,7 @@ void QRemoteObjectRegistry::pushToRegistryIfNeeded() const QSet<QString> registryLocs = QSet<QString>::fromList(sourceLocations().keys()); foreach (const QString &loc, myLocs & registryLocs) { qCWarning(QT_REMOTEOBJECT) << "Node warning: Ignoring Source" << loc << "as another source (" - << sourceLocations()[loc] << ") has already registered that name."; + << sourceLocations().value(loc) << ") has already registered that name."; hostedSources.remove(loc); return; } diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index f942af4..c5a01b5 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -7,6 +7,8 @@ sub_integration.subdir = integration sub_integration.target = sub-integration sub_integration.depends = sub-localsockettestserver -SUBDIRS += benchmarks repc sub_integration integration_multiprocess modelview cmake pods repcodegenerator repparser \ +SUBDIRS += benchmarks repc sub_integration modelview cmake pods repcodegenerator repparser \ sub_localsockettestserver \ modelreplica + +qtConfig(process): SUBDIRS += integration_multiprocess diff --git a/tests/auto/repc/signature/signature.pro b/tests/auto/repc/signature/signature.pro index 67df79e..047525d 100644 --- a/tests/auto/repc/signature/signature.pro +++ b/tests/auto/repc/signature/signature.pro @@ -17,5 +17,6 @@ SUBDIRS = \ differentSignalParamCount \ differentSignalParamType \ scrambledSignals \ - state \ - signatureTests + state + +qtConfig(process): SUBDIRS += signatureTests |