mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Don't save qupzilla:restore tabs in sessions
This commit is contained in:
parent
755ec16598
commit
cb4012c5c9
|
@ -780,6 +780,7 @@ QList<WebTab*> TabWidget::allTabs(bool withPinned)
|
|||
|
||||
QByteArray TabWidget::saveState()
|
||||
{
|
||||
int currentTabIndex = 0;
|
||||
QVector<WebTab::SavedTab> tabList;
|
||||
|
||||
for (int i = 0; i < count(); ++i) {
|
||||
|
@ -788,20 +789,29 @@ QByteArray TabWidget::saveState()
|
|||
continue;
|
||||
|
||||
WebTab::SavedTab tab(webTab);
|
||||
if (!tab.isValid())
|
||||
continue;
|
||||
|
||||
tabList.append(tab);
|
||||
|
||||
if (webTab->isCurrentTab())
|
||||
currentTabIndex = tabList.size() - 1;
|
||||
}
|
||||
|
||||
QByteArray data;
|
||||
QDataStream stream(&data, QIODevice::WriteOnly);
|
||||
|
||||
stream << tabList.count();
|
||||
if (!tabList.isEmpty()) {
|
||||
QDataStream stream(&data, QIODevice::WriteOnly);
|
||||
|
||||
foreach (const WebTab::SavedTab &tab, tabList) {
|
||||
stream << tab;
|
||||
stream << tabList.count();
|
||||
|
||||
foreach (const WebTab::SavedTab &tab, tabList) {
|
||||
stream << tab;
|
||||
}
|
||||
|
||||
stream << currentTabIndex;
|
||||
}
|
||||
|
||||
stream << currentIndex();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ WebTab::SavedTab::SavedTab()
|
|||
|
||||
WebTab::SavedTab::SavedTab(WebTab* webTab)
|
||||
{
|
||||
if (webTab->url().toString() == QL1S("qupzilla:restore")) {
|
||||
return;
|
||||
}
|
||||
|
||||
title = webTab->title();
|
||||
url = webTab->url();
|
||||
icon = webTab->icon(true);
|
||||
|
|
Loading…
Reference in New Issue
Block a user