From 6717d58192a9e4fb87b4721a34f3715766863851 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 12 Feb 2015 20:17:40 +0100 Subject: 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 --- src/webengine/plugin/plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/webengine/plugin/plugin.cpp') 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(uri, 1, 1, "WebEngineNewViewRequest", QObject::tr("Cannot create separate instance of WebEngineNewViewRequest")); qmlRegisterUncreatableType(uri, 1, 1, "WebEngineSettings", QObject::tr("Cannot create a separate instance of WebEngineSettings")); qmlRegisterSingletonType(uri, 1, 1, "WebEngine", webEngineSingletonProvider); + qmlRegisterUncreatableType(uri, 1, 1, "NavigationHistory", + QObject::tr("Cannot create a separate instance of NavigationHistory")); + qmlRegisterUncreatableType(uri, 1, 1, "NavigationHistoryListModel", + QObject::tr("Cannot create a separate instance of NavigationHistory")); } }; -- cgit v1.2.3