diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2012-04-09 17:19:15 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2012-04-09 17:58:07 +0300 |
commit | 9f7c332174554ebf821f9490e2463a666a7842ab (patch) | |
tree | 673b10670f20ca82aa632d0b6f6f8e6a28f79f7e | |
parent | 5872ea5f62c6eff9d55e50941824f3ade55ec5fd (diff) |
ConnectionManager: Finish introspection sucessfully when no protocols are found on the CM
-rw-r--r-- | TelepathyQt/connection-manager.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/TelepathyQt/connection-manager.cpp b/TelepathyQt/connection-manager.cpp index 5418bbf2..96b32348 100644 --- a/TelepathyQt/connection-manager.cpp +++ b/TelepathyQt/connection-manager.cpp @@ -1046,12 +1046,17 @@ void ConnectionManager::gotProtocolsLegacy(QDBusPendingCallWatcher *watcher) debug() << "Got reply to ConnectionManager.ListProtocols"; protocolsNames = reply.value(); - foreach (const QString &protocolName, protocolsNames) { - mPriv->protocols.append(ProtocolInfo(ConnectionManagerPtr(this), protocolName)); - mPriv->parametersQueue.enqueue(protocolName); - } + if (!protocolsNames.isEmpty()) { + foreach (const QString &protocolName, protocolsNames) { + mPriv->protocols.append(ProtocolInfo(ConnectionManagerPtr(this), protocolName)); + mPriv->parametersQueue.enqueue(protocolName); + } - mPriv->introspectParametersLegacy(); + mPriv->introspectParametersLegacy(); + } else { + //no protocols - introspection finished + mPriv->readinessHelper->setIntrospectCompleted(FeatureCore, true); + } } else { mPriv->readinessHelper->setIntrospectCompleted(FeatureCore, false, reply.error()); |