diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-01-25 16:02:22 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-01-29 08:22:36 +0000 |
commit | b59f9b9b2c89d3240a35958eafebf8660865f205 (patch) | |
tree | 2e94d9f2cb5621c9c31d833841e0fc487eeb660e /src/plugins/help/helpmanager.cpp | |
parent | 121e72106741e19d4dde5d9194fb31cb72677a51 (diff) |
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>
Diffstat (limited to 'src/plugins/help/helpmanager.cpp')
-rw-r--r-- | src/plugins/help/helpmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/help/helpmanager.cpp b/src/plugins/help/helpmanager.cpp index 5f7943b342..3391d94740 100644 --- a/src/plugins/help/helpmanager.cpp +++ b/src/plugins/help/helpmanager.cpp @@ -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); } |