forked from qt-creator/qt-creator
Highlight only topics, not in text hits.
Task-number: QTCREATORBUG-1964 Reviewed-by: kh
This commit is contained in:
@@ -857,12 +857,13 @@ void HelpPlugin::highlightSearchTerms()
|
|||||||
if (name.isEmpty())
|
if (name.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (m_oldAttrValue == name) {
|
if (m_oldAttrValue == name
|
||||||
|
|| name.startsWith(m_oldAttrValue + QLatin1Char('-'))) {
|
||||||
QWebElement parent = element.parent();
|
QWebElement parent = element.parent();
|
||||||
parent.setStyleProperty(property, m_styleProperty);
|
parent.setStyleProperty(property, m_styleProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attrValue == name) {
|
if (attrValue == name || name.startsWith(attrValue + QLatin1Char('-'))) {
|
||||||
QWebElement parent = element.parent();
|
QWebElement parent = element.parent();
|
||||||
m_styleProperty = parent.styleProperty(property,
|
m_styleProperty = parent.styleProperty(property,
|
||||||
QWebElement::InlineStyle);
|
QWebElement::InlineStyle);
|
||||||
@@ -871,7 +872,6 @@ void HelpPlugin::highlightSearchTerms()
|
|||||||
}
|
}
|
||||||
m_oldAttrValue = attrValue;
|
m_oldAttrValue = attrValue;
|
||||||
#endif
|
#endif
|
||||||
viewer->findText(m_idFromContext, 0, false, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user