Commit fae2cb49 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by unknown
Browse files

Fixed: Compile without WebKit

RevBy: con
parent 42c4b9dd
...@@ -87,7 +87,11 @@ HelpViewerFindSupport::HelpViewerFindSupport(HelpViewer *viewer) ...@@ -87,7 +87,11 @@ HelpViewerFindSupport::HelpViewerFindSupport(HelpViewer *viewer)
QString HelpViewerFindSupport::currentFindString() const QString HelpViewerFindSupport::currentFindString() const
{ {
QTC_ASSERT(m_viewer, return QString()); QTC_ASSERT(m_viewer, return QString());
#if !defined(QT_NO_WEBKIT)
return m_viewer->selectedText(); return m_viewer->selectedText();
#else
return QString();
#endif
} }
bool HelpViewerFindSupport::findIncremental(const QString &txt, QTextDocument::FindFlags findFlags) bool HelpViewerFindSupport::findIncremental(const QString &txt, QTextDocument::FindFlags findFlags)
...@@ -116,9 +120,9 @@ bool HelpViewerFindSupport::find(const QString &txt, QTextDocument::FindFlags fi ...@@ -116,9 +120,9 @@ bool HelpViewerFindSupport::find(const QString &txt, QTextDocument::FindFlags fi
return m_viewer->findText(txt, options); return m_viewer->findText(txt, options);
#else #else
QTextCursor cursor = viewer->textCursor(); QTextCursor cursor = m_viewer->textCursor();
QTextDocument *doc = viewer->document(); QTextDocument *doc = m_viewer->document();
QTextBrowser *browser = qobject_cast<QTextBrowser*>(viewer); QTextBrowser *browser = qobject_cast<QTextBrowser*>(m_viewer);
if (!browser || !doc || cursor.isNull()) if (!browser || !doc || cursor.isNull())
return false; return false;
...@@ -137,7 +141,7 @@ bool HelpViewerFindSupport::find(const QString &txt, QTextDocument::FindFlags fi ...@@ -137,7 +141,7 @@ bool HelpViewerFindSupport::find(const QString &txt, QTextDocument::FindFlags fi
} }
} }
if (!found.isNull()) { if (!found.isNull()) {
viewer->setTextCursor(found); m_viewer->setTextCursor(found);
} }
return true; return true;
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment