From 9f7c332174554ebf821f9490e2463a666a7842ab Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Mon, 9 Apr 2012 17:19:15 +0300 Subject: ConnectionManager: Finish introspection sucessfully when no protocols are found on the CM --- TelepathyQt/connection-manager.cpp | 15 ++++++++++----- 1 file 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()); -- cgit v1.2.3