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 /tests/quicktestbrowser/BrowserWindow.qml | |
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 'tests/quicktestbrowser/BrowserWindow.qml')
-rw-r--r-- | tests/quicktestbrowser/BrowserWindow.qml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml index 9312ed20e..2c8e9e1ea 100644 --- a/tests/quicktestbrowser/BrowserWindow.qml +++ b/tests/quicktestbrowser/BrowserWindow.qml @@ -161,10 +161,10 @@ ApplicationWindow { id: backHistoryMenu Instantiator { - model: currentWebView && currentWebView.experimental.navigationHistory.backItems + model: currentWebView && currentWebView.navigationHistory.backItems MenuItem { text: model.title - onTriggered: currentWebView.experimental.goBackTo(index) + onTriggered: currentWebView.goBackOrForward(model.offset) } onObjectAdded: backHistoryMenu.insertItem(index, object) @@ -176,10 +176,10 @@ ApplicationWindow { id: forwardHistoryMenu Instantiator { - model: currentWebView && currentWebView.experimental.navigationHistory.forwardItems + model: currentWebView && currentWebView.navigationHistory.forwardItems MenuItem { text: model.title - onTriggered: currentWebView.experimental.goForwardTo(index) + onTriggered: currentWebView.goBackOrForward(model.offset) } onObjectAdded: forwardHistoryMenu.insertItem(index, object) |