summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2014-03-27 17:26:27 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-28 19:45:12 +0100
commit072353fed80645a53b4bb22507dca5b98c023232 (patch)
treea1ff902544c8ff8337929333b1aefee7f5f0a9ac /src
parent7b64cb4c82067c249274d6b33fb4a20b60d34eac (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')
-rw-r--r--src/webengine/api/qquickwebenginehistory.cpp2
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()