* 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
The window layout is only saved if something has been changed.
When something relevant to the window layout is changed, a save is
queued to run after 10 seconds.
If within those 10 seconds, another thing is changed, that timer is
reset and will run after 10 seconds again.
Events that cause the save to be queued up:
- Tab created
- Tab removed
- Tab moved
- Tab name changed
- Split created
- Split removed
- Split moved
- Split channel changed
- Split resized
- Window moved
- Window resized
What currently does not trigger the save to be queued up:
- Active tab changed