From 072353fed80645a53b4bb22507dca5b98c023232 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 27 Mar 2014 17:26:27 +0100 Subject: 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 --- src/webengine/api/qquickwebenginehistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webengine') 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() -- cgit v1.2.3