diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 8c6ba19b..1848e682 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -181,6 +181,8 @@ void MainView::clear() // What exactly do we need to clear here? m_urlBar->clearHistory(); m_urlBar->clear(); + + m_recentlyClosedTabs.clear(); } @@ -414,6 +416,16 @@ void MainView::slotCloseTab(int index) return; } hasFocus = tab->hasFocus(); + + //store close tab except homepage + if (!tab->url().prettyUrl().startsWith("rekonq:") && !tab->url().isEmpty()) + { + QString title = tab->title(); + QString url = tab->url().prettyUrl(); + HistoryItem item(url, QDateTime::currentDateTime(), title); + m_recentlyClosedTabs.removeAll(item); + m_recentlyClosedTabs.prepend(item); + } } QWidget *webView = widget(index); @@ -573,6 +585,12 @@ QLabel *MainView::animatedLoading(int index, bool addMovie) } +QList<HistoryItem> MainView::recentlyClosedTabs() +{ + return m_recentlyClosedTabs; +} + + void MainView::resizeEvent(QResizeEvent *event) { updateTabBar(); |