1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Fixed clearing highlight when search text not found.

closes #479
This commit is contained in:
nowrep 2012-07-27 18:55:55 +02:00
parent 474d665e52
commit d97ab52d8c

View File

@ -117,6 +117,7 @@ void SearchToolBar::searchText(const QString &text)
{
WebView* view = p_QupZilla->weView();
bool found = view->findText(text, m_findFlags);
if (text.isEmpty()) {
found = true;
}
@ -125,9 +126,13 @@ 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("", QWebPage::HighlightAllOccurrences);
view->findText(QString(), QWebPage::HighlightAllOccurrences);
}
if (!found) {