1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Changing global version of session.dat file.

- rather than adding version check in tabwidget restore
This commit is contained in:
nowrep 2012-03-11 18:24:19 +01:00
parent 9042e7860d
commit 246f765a7a
2 changed files with 1 additions and 10 deletions

View File

@ -759,7 +759,7 @@ void MainApplication::aboutToCloseWindow(QupZilla* window)
}
//Version of session.dat file
static const int sessionVersion = 0x0002;
static const int sessionVersion = 0x0003;
bool MainApplication::saveStateSlot()
{

View File

@ -571,8 +571,6 @@ QList<WebTab*> TabWidget::allTabs(bool withPinned)
return allTabs;
}
static const qint32 TabWidgetFileVersion = 0xaaf;
void TabWidget::savePinnedTabs()
{
QByteArray data;
@ -671,7 +669,6 @@ QByteArray TabWidget::saveState()
QByteArray data;
QDataStream stream(&data, QIODevice::WriteOnly);
stream << TabWidgetFileVersion;
stream << tabList.count();
foreach(const WebTab::SavedTab & tab, tabList) {
@ -690,17 +687,11 @@ bool TabWidget::restoreState(QByteArray &state)
return false;
}
qint32 fileVersion = 0;
int tabListCount = 0;
int currentTab = 0;
stream >> fileVersion;
stream >> tabListCount;
if (fileVersion != TabWidgetFileVersion) {
return false;
}
for (int i = 0; i < tabListCount; ++i) {
WebTab::SavedTab tab;
stream >> tab;