diff options
author | Your Name <you@example.com> | 2011-02-02 18:24:31 +0200 |
---|---|---|
committer | Furkan Üzümcü <furkanuzumcu@gmail.com> | 2011-02-02 18:26:05 +0200 |
commit | 1faf469338c735e50fc05974e65a590dbc93a52c (patch) | |
tree | 861c2eec0154879adb29273d2f5c747249ff4014 | |
parent | This is a simpler version of the zoom save settings patch. (diff) | |
download | rekonq-1faf469338c735e50fc05974e65a590dbc93a52c.tar.xz |
Limit the number of entries in the closed tabs history to 10. Reviewed by benjaminp.
-rw-r--r-- | src/mainview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 699103a0..66c86bc5 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -462,10 +462,13 @@ void MainView::closeTab(int index, bool del) && !QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled) ) { + const int recentlyClosedTabsLimit = 10; QString title = tabToClose->view()->title(); QString url = tabToClose->url().prettyUrl(); HistoryItem item(url, QDateTime(), title); m_recentlyClosedTabs.removeAll(item); + if (m_recentlyClosedTabs.count() == recentlyClosedTabsLimit) + m_recentlyClosedTabs.removeLast(); m_recentlyClosedTabs.prepend(item); } |