diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-06 19:04:58 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-20 18:15:27 +0200 |
commit | 63c45a18d37350e5455cf2869832e8b1743712a2 (patch) | |
tree | 76f775cd4f87dac796e79eece760d8b2c4ea7b9b /examples/widgets/browser/history.cpp | |
parent | 68f3331b98d4d9996732117549cbdf4ea80cac70 (diff) | |
download | qtwebengine-63c45a18d37350e5455cf2869832e8b1743712a2.tar.gz |
demo browser: Make it link.
The ifdefs should later be removed along with the feature
implementations.
Change-Id: If73f4c4c02c00e90d6cf54c6a08bb37f43fa95bc
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'examples/widgets/browser/history.cpp')
-rw-r--r-- | examples/widgets/browser/history.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/widgets/browser/history.cpp b/examples/widgets/browser/history.cpp index 5a355707e..9d599f876 100644 --- a/examples/widgets/browser/history.cpp +++ b/examples/widgets/browser/history.cpp @@ -67,8 +67,11 @@ static const unsigned int HISTORY_VERSION = 23; HistoryManager::HistoryManager(QObject *parent) - : QWebEngineHistoryInterface(parent) - , m_saveTimer(new AutoSaver(this)) + : +#if defined(QWEBENGINEHISTORYINTERFACE) + QWebEngineHistoryInterface(parent), +#endif + m_saveTimer(new AutoSaver(this)) , m_historyLimit(30) , m_historyModel(0) , m_historyFilterModel(0) @@ -87,8 +90,10 @@ HistoryManager::HistoryManager(QObject *parent) 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); +#endif } HistoryManager::~HistoryManager() @@ -180,9 +185,11 @@ void HistoryManager::checkForExpired() void HistoryManager::addHistoryItem(const HistoryItem &item) { +#if defined(QWEBENGINESETTINGS) QWebEngineSettings *globalSettings = QWebEngineSettings::globalSettings(); if (globalSettings->testAttribute(QWebEngineSettings::PrivateBrowsingEnabled)) return; +#endif m_history.prepend(item); emit entryAdded(item); |