summaryrefslogtreecommitdiffstats
path: root/src/assistant/assistant/helpviewer.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-11-28 10:18:38 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2014-12-09 12:07:19 +0100
commit008926f193ceb29da6ca94fae6a7efb3ca0e0f09 (patch)
treea1f33bf5af43a6d1a7552e413d22e1ac86542a8b /src/assistant/assistant/helpviewer.h
parentdd45163e883d9db55ce0361db81b96a0c0f97bd7 (diff)
Assistant: Introduce DEFINES per browser type.
This makes it easier to add additional browser types and switch between browsers. Task-number: QTBUG-41130 Change-Id: I88e2890bfe9e815ed7deb9d867060f244b7e2a45 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Alejandro Exojo Piqueras <suy@badopi.org>
Diffstat (limited to 'src/assistant/assistant/helpviewer.h')
-rw-r--r--src/assistant/assistant/helpviewer.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/assistant/assistant/helpviewer.h b/src/assistant/assistant/helpviewer.h
index 9e268b0a0..e9deaf389 100644
--- a/src/assistant/assistant/helpviewer.h
+++ b/src/assistant/assistant/helpviewer.h
@@ -42,19 +42,19 @@
#include <QtWidgets/QAction>
#include <QtGui/QFont>
-#if defined(QT_NO_WEBKIT)
-#include <QtWidgets/QTextBrowser>
-#else
-#include <QWebView>
+#if defined(BROWSER_QTWEBKIT)
+# include <QWebView>
+#elif defined(BROWSER_QTEXTBROWSER)
+# include <QtWidgets/QTextBrowser>
#endif
QT_BEGIN_NAMESPACE
class HelpEngineWrapper;
-#if !defined(QT_NO_WEBKIT)
+#if defined(BROWSER_QTWEBKIT)
class HelpViewer : public QWebView
-#else
+#elif defined(BROWSER_QTEXTBROWSER)
class HelpViewer : public QTextBrowser
#endif
{
@@ -114,14 +114,16 @@ public slots:
signals:
void titleChanged();
-#if !defined(QT_NO_WEBKIT)
+#if !defined(BROWSER_QTEXTBROWSER)
+ // Provide signals present in QTextBrowser, QTextEdit for browsers that do not inherit QTextBrowser
void copyAvailable(bool yes);
void sourceChanged(const QUrl &url);
void forwardAvailable(bool enabled);
void backwardAvailable(bool enabled);
void highlighted(const QString &link);
void printRequested();
-#else
+#elif !defined(BROWSER_QTWEBKIT)
+ // Provide signals present in QWebView for browsers that do not inherit QWebView
void loadStarted();
void loadFinished(bool finished);
#endif