summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-16 01:50:19 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-16 01:50:19 +0200
commit5e581fc1fa5a1d1d23fe8c4e3fe94fb2fc9250ab (patch)
tree793f486c85d6c62465bb761e5dac3c6d0a0072d2 /src/mainview.cpp
parentMerge commit 'refs/merge-requests/139' of git://gitorious.org/rekonq/mainline (diff)
downloadrekonq-5e581fc1fa5a1d1d23fe8c4e3fe94fb2fc9250ab.tar.xz
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
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp10
1 files changed, 8 insertions, 2 deletions
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);
}
}