Help: Avoid looking up invalid help ID over and over again

Make the help link cache remember that it tried before.

Change-Id: Id9d07a7b86c4fa856b7fa3a5e17cd5d4115861ff
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-01-25 15:48:24 +01:00
parent 282805b66d
commit 121e721067
2 changed files with 5 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ QString HelpItem::extractContent(bool extended) const
QMap<QString, QUrl> HelpItem::links() const
{
if (m_helpLinks.isEmpty())
if (!m_helpLinks)
m_helpLinks = Core::HelpManager::linksForIdentifier(m_helpId);
return m_helpLinks;
return *m_helpLinks;
}