summaryrefslogtreecommitdiff
path: root/src/plugins/help/helpfindsupport.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <qtc-committer@nokia.com>2009-03-18 10:36:10 +0100
committerunknown <Thomas@.(none)>2009-03-18 10:36:10 +0100
commitfae2cb49821170581be5d8ea3967bc8a0cc861f8 (patch)
tree92ca8eac5360361322116339b109b9556899e332 /src/plugins/help/helpfindsupport.cpp
parent42c4b9dd523b2090b55e8d795c95ad4127a5aeed (diff)
downloadqt-creator-fae2cb49821170581be5d8ea3967bc8a0cc861f8.tar.gz
Fixed: Compile without WebKit
RevBy: con
Diffstat (limited to 'src/plugins/help/helpfindsupport.cpp')
-rw-r--r--src/plugins/help/helpfindsupport.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/help/helpfindsupport.cpp b/src/plugins/help/helpfindsupport.cpp
index 0f28634ad3..0f2b9cf887 100644
--- a/src/plugins/help/helpfindsupport.cpp
+++ b/src/plugins/help/helpfindsupport.cpp
@@ -87,7 +87,11 @@ HelpViewerFindSupport::HelpViewerFindSupport(HelpViewer *viewer)
QString HelpViewerFindSupport::currentFindString() const
{
QTC_ASSERT(m_viewer, return QString());
+#if !defined(QT_NO_WEBKIT)
return m_viewer->selectedText();
+#else
+ return QString();
+#endif
}
bool HelpViewerFindSupport::findIncremental(const QString &txt, QTextDocument::FindFlags findFlags)
@@ -116,9 +120,9 @@ bool HelpViewerFindSupport::find(const QString &txt, QTextDocument::FindFlags fi
return m_viewer->findText(txt, options);
#else
- QTextCursor cursor = viewer->textCursor();
- QTextDocument *doc = viewer->document();
- QTextBrowser *browser = qobject_cast<QTextBrowser*>(viewer);
+ QTextCursor cursor = m_viewer->textCursor();
+ QTextDocument *doc = m_viewer->document();
+ QTextBrowser *browser = qobject_cast<QTextBrowser*>(m_viewer);
if (!browser || !doc || cursor.isNull())
return false;
@@ -137,7 +141,7 @@ bool HelpViewerFindSupport::find(const QString &txt, QTextDocument::FindFlags fi
}
}
if (!found.isNull()) {
- viewer->setTextCursor(found);
+ m_viewer->setTextCursor(found);
}
return true;
#endif