Help: Do not actually try to lookup empty identifiers or keywords

Avoid the unneeded database lookup.

Change-Id: I077e3bdcc30543fd903c6fc62da814b4c84f0d25
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-01-25 16:02:22 +01:00
parent 121e721067
commit b59f9b9b2c

View File

@@ -226,12 +226,16 @@ QSet<QString> HelpManager::userDocumentationPaths()
QMap<QString, QUrl> HelpManager::linksForKeyword(const QString &key)
{
QTC_ASSERT(!d->m_needsSetup, return {});
if (key.isEmpty())
return {};
return d->m_helpEngine->linksForKeyword(key);
}
QMap<QString, QUrl> HelpManager::linksForIdentifier(const QString &id)
{
QTC_ASSERT(!d->m_needsSetup, return {});
if (id.isEmpty())
return {};
return d->m_helpEngine->linksForIdentifier(id);
}