From b59f9b9b2c89d3240a35958eafebf8660865f205 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 25 Jan 2019 16:02:22 +0100 Subject: [PATCH] Help: Do not actually try to lookup empty identifiers or keywords Avoid the unneeded database lookup. Change-Id: I077e3bdcc30543fd903c6fc62da814b4c84f0d25 Reviewed-by: David Schulz --- src/plugins/help/helpmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/help/helpmanager.cpp b/src/plugins/help/helpmanager.cpp index 5f7943b3428..3391d94740a 100644 --- a/src/plugins/help/helpmanager.cpp +++ b/src/plugins/help/helpmanager.cpp @@ -226,12 +226,16 @@ QSet HelpManager::userDocumentationPaths() QMap HelpManager::linksForKeyword(const QString &key) { QTC_ASSERT(!d->m_needsSetup, return {}); + if (key.isEmpty()) + return {}; return d->m_helpEngine->linksForKeyword(key); } QMap HelpManager::linksForIdentifier(const QString &id) { QTC_ASSERT(!d->m_needsSetup, return {}); + if (id.isEmpty()) + return {}; return d->m_helpEngine->linksForIdentifier(id); }