Here a patch that fix back menu...

There is a wrong assumption in current code: backItems(nb) doesn't return nb 
last items but nb first items.

So history menu is wrong after 8 pages.

Cédric
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 7a9e3ad..d55266d 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1068,13 +1139,9 @@ void MainWindow::aboutToShowBackMenu()
     if (!currentTab())
         return;
     QWebHistory *history = currentTab()->history();
-    int historyCount = history->count();
-
-    // Limit history views in the menu to 8
-    if(historyCount > 8)
-        historyCount = 8;
+    int historyLimit = 0;
 
-    for (int i = history->backItems(historyCount).count() - 1; i >= 0; --i)
+    for (int i = history->backItems(history->count()).count() - 1; i >= 0 && historyLimit < 8; --i)
     {
         QWebHistoryItem item = history->backItems(history->count()).at(i);
         KAction *action = new KAction(this);
@@ -1083,6 +1150,7 @@ void MainWindow::aboutToShowBackMenu()
         action->setIcon(icon);
         action->setText(item.title());
         m_historyBackMenu->addAction(action);
+        historyLimit += 1;
     }
 }
 
_______________________________________________
rekonq mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/rekonq

Reply via email to