diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2014-03-27 17:26:27 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-28 19:45:12 +0100 |
commit | 072353fed80645a53b4bb22507dca5b98c023232 (patch) | |
tree | a1ff902544c8ff8337929333b1aefee7f5f0a9ac /src/webengine | |
parent | 7b64cb4c82067c249274d6b33fb4a20b60d34eac (diff) |
Fix QQuickWebEngineForwardHistoryListModel
The index calculation was wrong for the history items in the forward
list model: model contained the current item too.
Test has been added for check the previous and next element in the back
and forward lists.
Change-Id: I0e05881f05b67752e47b01236ffb9636d31a7dc2
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/api/qquickwebenginehistory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebenginehistory.cpp b/src/webengine/api/qquickwebenginehistory.cpp index 551a57205..184b7079d 100644 --- a/src/webengine/api/qquickwebenginehistory.cpp +++ b/src/webengine/api/qquickwebenginehistory.cpp @@ -89,7 +89,7 @@ int QQuickWebEngineForwardHistoryListModelPrivate::count() const int QQuickWebEngineForwardHistoryListModelPrivate::index(int i) const { - return adapter()->currentNavigationEntryIndex() + i; + return adapter()->currentNavigationEntryIndex() + i + 1; } QQuickWebEngineHistoryListModel::QQuickWebEngineHistoryListModel() |