diff options
author | Pierre Rossi <pierre.rossi@theqtcompany.com> | 2015-02-12 20:17:40 +0100 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@theqtcompany.com> | 2015-02-18 13:17:45 +0000 |
commit | 6717d58192a9e4fb87b4721a34f3715766863851 (patch) | |
tree | 9014acec9ccde3cd2c36a89725ed8bbb215f0d82 /src/webengine/plugin/plugin.cpp | |
parent | 4bac2cb5084c68354e43fb456e4d20d4f70b223a (diff) |
Move navigationHistory out of experimental
Add an offset role to the models.
Implement goBackAndForward that uses this offset.
Also add a complete model, items, that includes current
navigation entry (at offset 0) to allow for the Firefox-style
single menu, and add that one to the nano browser example.
The models are now instantiated lazily as it's unlikely the
three models will be used by the same app.
Change-Id: Ib551738611497c7eb9c501f045cda315968a2ada
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/webengine/plugin/plugin.cpp')
-rw-r--r-- | src/webengine/plugin/plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp index da1b4f81b..b752315f7 100644 --- a/src/webengine/plugin/plugin.cpp +++ b/src/webengine/plugin/plugin.cpp @@ -38,6 +38,7 @@ #include "qquickwebenginecertificateerror_p.h" #include "qquickwebenginedownloaditem_p.h" +#include "qquickwebenginehistory_p.h" #include "qquickwebengineloadrequest_p.h" #include "qquickwebenginenavigationrequest_p.h" #include "qquickwebenginenewviewrequest_p.h" @@ -75,6 +76,10 @@ public: qmlRegisterUncreatableType<QQuickWebEngineNewViewRequest>(uri, 1, 1, "WebEngineNewViewRequest", QObject::tr("Cannot create separate instance of WebEngineNewViewRequest")); qmlRegisterUncreatableType<QQuickWebEngineSettings>(uri, 1, 1, "WebEngineSettings", QObject::tr("Cannot create a separate instance of WebEngineSettings")); qmlRegisterSingletonType<QQuickWebEngineSingleton>(uri, 1, 1, "WebEngine", webEngineSingletonProvider); + qmlRegisterUncreatableType<QQuickWebEngineHistory>(uri, 1, 1, "NavigationHistory", + QObject::tr("Cannot create a separate instance of NavigationHistory")); + qmlRegisterUncreatableType<QQuickWebEngineHistoryListModel>(uri, 1, 1, "NavigationHistoryListModel", + QObject::tr("Cannot create a separate instance of NavigationHistory")); } }; |