summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-06-30 14:59:08 +0200
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-07-08 09:11:36 +0000
commit355f60c6e729fc8a159ed4667d793097e7cbd696 (patch)
tree25241a404eed3b44363d0b5d84b38478b5a5621c /examples/webenginewidgets
parentbf67cf88ee9a14b61272f9c58508001fa2feb011 (diff)
remove QWebEngineHistoryInterface usage from browser example
QWebHistoryInterface is used to implement support for keeping track of visited links. QWebEngine is already doing this internally, removing the need for a QWebEngineHistoryInterface. Change-Id: I908a81368b57a86845bc75ff75bf8eb7949ab0cc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'examples/webenginewidgets')
-rw-r--r--examples/webenginewidgets/browser/history.cpp17
-rw-r--r--examples/webenginewidgets/browser/history.h11
2 files changed, 3 insertions, 25 deletions
diff --git a/examples/webenginewidgets/browser/history.cpp b/examples/webenginewidgets/browser/history.cpp
index d9d76cd29..ce104e982 100644
--- a/examples/webenginewidgets/browser/history.cpp
+++ b/examples/webenginewidgets/browser/history.cpp
@@ -59,9 +59,6 @@
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QStyle>
-#if defined(QWEBENGINEHISTORYINTERFACE)
-#include <QWebEngineHistoryInterface>
-#endif
#include <QWebEngineSettings>
#include <QtCore/QDebug>
@@ -69,11 +66,8 @@
static const unsigned int HISTORY_VERSION = 23;
HistoryManager::HistoryManager(QObject *parent)
- :
-#if defined(QWEBENGINEHISTORYINTERFACE)
- QWebEngineHistoryInterface(parent),
-#endif
- m_saveTimer(new AutoSaver(this))
+ : QObject(parent)
+ , m_saveTimer(new AutoSaver(this))
, m_historyLimit(30)
, m_historyModel(0)
, m_historyFilterModel(0)
@@ -91,13 +85,6 @@ HistoryManager::HistoryManager(QObject *parent)
m_historyModel = new HistoryModel(this, this);
m_historyFilterModel = new HistoryFilterModel(m_historyModel, this);
m_historyTreeModel = new HistoryTreeModel(m_historyFilterModel, this);
-
-#if defined(QWEBENGINEHISTORYINTERFACE)
- // QWebEngineHistoryInterface will delete the history manager
- QWebEngineHistoryInterface::setDefaultInterface(this);
-#else
- Q_UNUSED(parent);
-#endif
}
HistoryManager::~HistoryManager()
diff --git a/examples/webenginewidgets/browser/history.h b/examples/webenginewidgets/browser/history.h
index 3519d31b6..bcb9c9b28 100644
--- a/examples/webenginewidgets/browser/history.h
+++ b/examples/webenginewidgets/browser/history.h
@@ -52,10 +52,6 @@
#include <QtCore/QSortFilterProxyModel>
-#if defined(QWEBENGINEHISTORYINTERFACE)
-#include <QWebEngineHistoryInterface>
-#endif
-
class HistoryItem
{
public:
@@ -82,12 +78,7 @@ class HistoryModel;
class HistoryFilterModel;
class HistoryTreeModel;
-class HistoryManager
-#if defined(QWEBENGINEHISTORYINTERFACE)
- : public QWebEngineHistoryInterface
-#else
- : public QObject
-#endif
+class HistoryManager : public QObject
{
Q_OBJECT
Q_PROPERTY(int historyLimit READ historyLimit WRITE setHistoryLimit)