mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
ClosedTabsManager: Move check for saving restore tab from TabWidget
This commit is contained in:
parent
3f60c554ee
commit
679268dbd1
@ -425,13 +425,9 @@ void TabWidget::closeTab(int index)
|
||||
if (!webTab || !validIndex(index))
|
||||
return;
|
||||
|
||||
m_closedTabsManager->saveTab(webTab);
|
||||
|
||||
TabbedWebView *webView = webTab->webView();
|
||||
|
||||
// Save tab url and history
|
||||
if (webView->url().toString() != QL1S("falkon:restore")) {
|
||||
m_closedTabsManager->saveTab(webTab);
|
||||
}
|
||||
|
||||
m_locationBars->removeWidget(webView->webTab()->locationBar());
|
||||
disconnect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
||||
disconnect(webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(changed()));
|
||||
|
@ -36,6 +36,11 @@ void ClosedTabsManager::saveTab(WebTab *tab)
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't save restore tab
|
||||
if (tab->url().toString() == QL1S("qupzilla:restore")) {
|
||||
return;
|
||||
}
|
||||
|
||||
Tab closedTab;
|
||||
closedTab.position = tab->tabIndex();
|
||||
closedTab.tabState = WebTab::SavedTab(tab);
|
||||
|
Loading…
Reference in New Issue
Block a user