Core/Help: Clean up HelpManager interface and users

Change-Id: Ia6edf583f2a002d7c6f4878df670a78614ea087d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
hjk
2013-08-29 19:00:34 +02:00
parent 975e1be2ab
commit d66369e21d
20 changed files with 197 additions and 231 deletions

View File

@@ -160,21 +160,21 @@ bool HoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::
helpIdPieces.prepend(moduleName);
helpIdPieces.prepend(QLatin1String("QML"));
helpId = helpIdPieces.join(QLatin1String("."));
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
if (helpIdPieces.size() > 3) {
QString lm = helpIdPieces.value(2);
helpIdPieces.removeAt(2);
helpId = helpIdPieces.join(QLatin1String("."));
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
helpIdPieces.replace(1, lm);
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
}
helpIdPieces.removeAt(1);
helpId = helpIdPieces.join(QLatin1String("."));
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
return false;
} while (0);
@@ -483,13 +483,13 @@ bool HoverHandler::setQmlHelpItem(const ScopeChain &scopeChain,
do {
helpId = QLatin1String("QML.") + moduleName + QLatin1Char('.') + className
+ QLatin1String("::") + name;
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
helpId = QLatin1String("QML.") + className + QLatin1String("::") + name;
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
helpId = className + QLatin1String("::") + name;
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
break;
helpId.clear();
} while (0);