From 5e581fc1fa5a1d1d23fe8c4e3fe94fb2fc9250ab Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 16 Jun 2010 01:50:19 +0200 Subject: This commit changes rekonq behavior on "closed tabs" management. The problem comes when too much sites are listed as closed tabs, so I though to create the contextual menu just on request and to clean out the sites that are reopened. (They are NO MORE closed tabs..) This and the next commit should fast a lot rekonq about that --- src/mainview.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index 166c1a1b..a3f56958 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -115,7 +115,7 @@ void MainView::postLaunch() break; QString title = line; QString url = title; - HistoryItem item(url, QDateTime::currentDateTime(), title); + HistoryItem item(url, QDateTime(), title); m_recentlyClosedTabs.removeAll(item); m_recentlyClosedTabs.prepend(item); } @@ -503,7 +503,7 @@ void MainView::closeTab(int index, bool del) { QString title = tab->view()->title(); QString url = tab->url().prettyUrl(); - HistoryItem item(url, QDateTime::currentDateTime(), title); + HistoryItem item(url, QDateTime(), title); m_recentlyClosedTabs.removeAll(item); m_recentlyClosedTabs.prepend(item); } @@ -649,6 +649,7 @@ void MainView::openClosedTabs() { Application::instance()->loadUrl( KUrl(item.url), Rekonq::SettingOpenTab); } + m_recentlyClosedTabs.clear(); } void MainView::openClosedTab() @@ -657,6 +658,11 @@ void MainView::openClosedTab() if (action) { Application::instance()->loadUrl(action->data().toUrl(), Rekonq::SettingOpenTab); + + QString title = action->text(); + title = title.remove('&'); + HistoryItem item(action->data().toString(), QDateTime(), title ); + m_recentlyClosedTabs.removeAll(item); } } -- cgit v1.2.1