Ejemplo n.º 1
0
void FindBar::updateHighlight()
{
    Q_ASSERT(m_associatedWebView);

    QWebPage::FindFlags options = QWebPage::HighlightAllOccurrences;

    m_associatedWebView->page()->findText(QString(), options); //Clear an existing highlight

    if (!isHidden() && highlightAllState())
    {
        if (matchCase())
            options |= QWebPage::FindCaseSensitively;
        m_associatedWebView->page()->findText(_lastStringSearched, options);
    }
}
Ejemplo n.º 2
0
void FindBar::updateHighlight()
{
    // parent webwindow
    WebWindow *w = qobject_cast<WebWindow *>(parent());

    QWebPage::FindFlags options = QWebPage::HighlightAllOccurrences;

    w->page()->findText(QL1S(""), options); //Clear an existing highlight

    if (!isHidden() && highlightAllState())
    {
        if (matchCase())
            options |= QWebPage::FindCaseSensitively;

        w->page()->findText(_lastStringSearched, options);
    }
}