1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 12:46:35 +01:00

Don't return empty QByteArray when there are no tabs in session

This commit is contained in:
David Rosca 2017-04-07 12:38:54 +02:00
parent cb4012c5c9
commit 3492999abe

View File

@ -799,19 +799,16 @@ QByteArray TabWidget::saveState()
}
QByteArray data;
QDataStream stream(&data, QIODevice::WriteOnly);
if (!tabList.isEmpty()) {
QDataStream stream(&data, QIODevice::WriteOnly);
stream << tabList.count();
stream << tabList.count();
foreach (const WebTab::SavedTab &tab, tabList) {
stream << tab;
}
stream << currentTabIndex;
foreach (const WebTab::SavedTab &tab, tabList) {
stream << tab;
}
stream << currentTabIndex;
return data;
}