forked from qt-creator/qt-creator
HelpItem: Fix usage of isFuzzyMatch
We may not access that before links are resolved. Change-Id: I5e80190e41c220c6b70e5d391caaf173cd5b28d8 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -270,7 +270,7 @@ static const HelpItem::Links getBestLink(const HelpItem::Links &links)
|
|||||||
|
|
||||||
const HelpItem::Links HelpItem::bestLinks() const
|
const HelpItem::Links HelpItem::bestLinks() const
|
||||||
{
|
{
|
||||||
if (m_isFuzzyMatch)
|
if (isFuzzyMatch())
|
||||||
return getBestLinks(links());
|
return getBestLinks(links());
|
||||||
return getBestLink(links());
|
return getBestLink(links());
|
||||||
}
|
}
|
||||||
@@ -279,3 +279,10 @@ const QString HelpItem::keyword() const
|
|||||||
{
|
{
|
||||||
return m_keyword;
|
return m_keyword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HelpItem::isFuzzyMatch() const
|
||||||
|
{
|
||||||
|
// make sure m_isFuzzyMatch is correct
|
||||||
|
links();
|
||||||
|
return m_isFuzzyMatch;
|
||||||
|
}
|
||||||
|
@@ -86,6 +86,8 @@ public:
|
|||||||
const QString keyword() const;
|
const QString keyword() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool isFuzzyMatch() const;
|
||||||
|
|
||||||
QUrl m_helpUrl;
|
QUrl m_helpUrl;
|
||||||
QStringList m_helpIds;
|
QStringList m_helpIds;
|
||||||
QString m_docMark;
|
QString m_docMark;
|
||||||
|
Reference in New Issue
Block a user