Help: Cleanly separate different viewer backends

Removes the conditional compilation of the text browser vs web kit,
cleans up the code, and enables us to provide and test other backends
(WebEngine? Native?)
Adds runtime switch for testing the text browser variant by setting
environment variable QTC_FORCE_TEXTBROWSER (for now)

Change-Id: I8cc9bb373438d37c8194e433224314caa0b617bd
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2014-05-02 16:54:28 +02:00
parent 0ae6905525
commit 96e8f0bb7b
16 changed files with 1083 additions and 828 deletions

View File

@@ -85,6 +85,11 @@ struct ExtensionMap {
{ 0, 0 }
};
HelpViewer::HelpViewer(QWidget *parent)
: QWidget(parent)
{
}
bool HelpViewer::isLocalUrl(const QUrl &url)
{
return url.scheme() == QLatin1String("about") // "No documenation available"
@@ -155,11 +160,11 @@ void HelpViewer::slotLoadStarted()
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
}
void HelpViewer::slotLoadFinished(bool ok)
void HelpViewer::slotLoadFinished()
{
Q_UNUSED(ok)
emit sourceChanged(source());
qApp->restoreOverrideCursor();
emit sourceChanged(source());
emit loadFinished();
}
bool HelpViewer::handleForwardBackwardMouseButtons(QMouseEvent *event)