Save and load persistant config file

This commit is contained in:
baldurk
2016-10-07 19:15:00 +02:00
parent 3ec1be62ff
commit 03eb2ea696
9 changed files with 431 additions and 8 deletions
+3 -3
View File
@@ -227,9 +227,6 @@ QVariantMap MainWindow::saveState()
{
QVariantMap state = ui->toolWindowManager->saveState();
// marker that this is indeed a valid state to load from
state["renderdocLayoutData"] = 1;
state["mainWindowGeometry"] = saveGeometry().toBase64();
return state;
@@ -250,6 +247,9 @@ bool MainWindow::SaveLayout(int layout)
QVariantMap state = saveState();
// marker that this is indeed a valid state to load from
state["renderdocLayoutData"] = 1;
QFile f(path);
if(f.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text))
{