diff options
| author | Kevin Funk <kevin.funk.ford@kdab.com> | 2016-03-16 14:19:30 +0100 |
|---|---|---|
| committer | Kevin Funk <kevin.funk@kdab.com> | 2016-03-21 10:57:54 +0000 |
| commit | 0e294632142a5f34036cdbe60c5daae2f9f72e67 (patch) | |
| tree | c0746c574f2c506633b3e251addb125dbd57d60c /src/remoteobjects/qremoteobjectregistrysource.cpp | |
| parent | d49e5ab149eeec9c22a88a722ac1848139be016c (diff) | |
Provide type name for source locations
Extend QRemoteObjectSourceLocation to also carry the type name of the
object.
Change-Id: Ic50b3682343b92099a5e2f6c564bd10cc543356c
Reviewed-by: Continuous Integration (KDAB) <build@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectregistrysource.cpp')
| -rw-r--r-- | src/remoteobjects/qremoteobjectregistrysource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remoteobjects/qremoteobjectregistrysource.cpp b/src/remoteobjects/qremoteobjectregistrysource.cpp index 3eca0db..c5339e2 100644 --- a/src/remoteobjects/qremoteobjectregistrysource.cpp +++ b/src/remoteobjects/qremoteobjectregistrysource.cpp @@ -67,7 +67,7 @@ void QRegistrySource::removeServer(const QUrl &url) typedef QRemoteObjectSourceLocations::const_iterator CustomIterator; const CustomIterator end = m_sourceLocations.constEnd(); for (CustomIterator it = m_sourceLocations.constBegin(); it != end; ++it) - if (it.value() == url) + if (it.value().hostUrl == url) results.push_back(it.key()); Q_FOREACH (const QString &res, results) m_sourceLocations.remove(res); @@ -77,7 +77,7 @@ void QRegistrySource::addSource(const QRemoteObjectSourceLocation &entry) { qCDebug(QT_REMOTEOBJECT) << "An entry was added to the RegistrySource" << entry; if (m_sourceLocations.contains(entry.first)) { - if (m_sourceLocations[entry.first] == entry.second) + if (m_sourceLocations[entry.first].hostUrl == entry.second.hostUrl) qCWarning(QT_REMOTEOBJECT) << "Node warning: Ignoring Source" << entry.first << "as this Node already has a Source by that name."; else @@ -92,7 +92,7 @@ void QRegistrySource::addSource(const QRemoteObjectSourceLocation &entry) void QRegistrySource::removeSource(const QRemoteObjectSourceLocation &entry) { - if (m_sourceLocations.contains(entry.first) && m_sourceLocations[entry.first] == entry.second) { + if (m_sourceLocations.contains(entry.first) && m_sourceLocations[entry.first].hostUrl == entry.second.hostUrl) { m_sourceLocations.remove(entry.first); emit remoteObjectRemoved(entry); } |
