mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +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))
|
if (!webTab || !validIndex(index))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TabbedWebView *webView = webTab->webView();
|
|
||||||
|
|
||||||
// Save tab url and history
|
|
||||||
if (webView->url().toString() != QL1S("falkon:restore")) {
|
|
||||||
m_closedTabsManager->saveTab(webTab);
|
m_closedTabsManager->saveTab(webTab);
|
||||||
}
|
|
||||||
|
|
||||||
|
TabbedWebView *webView = webTab->webView();
|
||||||
m_locationBars->removeWidget(webView->webTab()->locationBar());
|
m_locationBars->removeWidget(webView->webTab()->locationBar());
|
||||||
disconnect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
disconnect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
|
||||||
disconnect(webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(changed()));
|
disconnect(webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(changed()));
|
||||||
|
|
|
@ -36,6 +36,11 @@ void ClosedTabsManager::saveTab(WebTab *tab)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't save restore tab
|
||||||
|
if (tab->url().toString() == QL1S("qupzilla:restore")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Tab closedTab;
|
Tab closedTab;
|
||||||
closedTab.position = tab->tabIndex();
|
closedTab.position = tab->tabIndex();
|
||||||
closedTab.tabState = WebTab::SavedTab(tab);
|
closedTab.tabState = WebTab::SavedTab(tab);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user