implemented fallback logic for corrupted window layout (#1039)

* fallback logic for corrupted window layout

1. before saving the window-layout a backup will created to avoid corruption due to crashes while saving

2. when starting chatterino and the window-layout file returns and empty window layout (due to corruptio) the backup will be read and the layout will be build from this data

* Update WindowManager.hpp

* used QSaveFile instead of crude custom implementation

* implemented suggested feedback from review

* proper method call

was tired and slightly drunk Kapp
This commit is contained in:
TranRed
2019-05-01 09:58:13 +02:00
committed by fourtf
parent ad559f9d97
commit 34f820be18
2 changed files with 15 additions and 7 deletions
+1
View File
@@ -54,6 +54,7 @@ public:
virtual void initialize(Settings &settings, Paths &paths) override;
virtual void save() override;
void closeAll();
QJsonArray loadWindowArray(const QString &settingsPath);
int getGeneration() const;
void incGeneration();