forked from qt-creator/qt-creator
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:
@@ -226,12 +226,16 @@ QSet<QString> HelpManager::userDocumentationPaths()
|
|||||||
QMap<QString, QUrl> HelpManager::linksForKeyword(const QString &key)
|
QMap<QString, QUrl> HelpManager::linksForKeyword(const QString &key)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!d->m_needsSetup, return {});
|
QTC_ASSERT(!d->m_needsSetup, return {});
|
||||||
|
if (key.isEmpty())
|
||||||
|
return {};
|
||||||
return d->m_helpEngine->linksForKeyword(key);
|
return d->m_helpEngine->linksForKeyword(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QUrl> HelpManager::linksForIdentifier(const QString &id)
|
QMap<QString, QUrl> HelpManager::linksForIdentifier(const QString &id)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!d->m_needsSetup, return {});
|
QTC_ASSERT(!d->m_needsSetup, return {});
|
||||||
|
if (id.isEmpty())
|
||||||
|
return {};
|
||||||
return d->m_helpEngine->linksForIdentifier(id);
|
return d->m_helpEngine->linksForIdentifier(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user