1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Properly fixed highlighting from d97ab52d8c

This commit is contained in:
nowrep 2012-07-27 21:23:41 +02:00
parent 45e43df849
commit c44e64814c

View File

@ -116,6 +116,10 @@ void SearchToolBar::caseSensitivityChanged()
void SearchToolBar::searchText(const QString &text)
{
WebView* view = p_QupZilla->weView();
// Clear highlighting on page
view->findText(QString(), QWebPage::HighlightAllOccurrences);
bool found = view->findText(text, m_findFlags);
if (text.isEmpty()) {
@ -126,10 +130,6 @@ void SearchToolBar::searchText(const QString &text)
m_findFlags = QWebPage::HighlightAllOccurrences;
updateFindFlags();
view->findText(text, m_findFlags);
if (!found) {
view->findText(QString(), QWebPage::HighlightAllOccurrences);
}
}
else {
view->findText(QString(), QWebPage::HighlightAllOccurrences);