1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-22 02:02:10 +02: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(); WebView* view = p_QupZilla->weView();
bool found = view->findText(text, m_findFlags); bool found = view->findText(text, m_findFlags);
if (text.isEmpty()) { if (text.isEmpty()) {
found = true; found = true;
} }
@ -125,9 +126,13 @@ void SearchToolBar::searchText(const QString &text)
m_findFlags = QWebPage::HighlightAllOccurrences; m_findFlags = QWebPage::HighlightAllOccurrences;
updateFindFlags(); updateFindFlags();
view->findText(text, m_findFlags); view->findText(text, m_findFlags);
if (!found) {
view->findText(QString(), QWebPage::HighlightAllOccurrences);
}
} }
else { else {
view->findText("", QWebPage::HighlightAllOccurrences); view->findText(QString(), QWebPage::HighlightAllOccurrences);
} }
if (!found) { if (!found) {