From 8391aa4d79891b47969f59d39c5829eb27b7e923 Mon Sep 17 00:00:00 2001 From: Norbert Moutarde Date: Fri, 30 May 2014 23:07:17 +0200 Subject: [PATCH] all the content is saved on quit (and restored on run) --- mainwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 4ce99a7..b2f2184 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -80,9 +80,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) start(); } void MainWindow::start(){ - way.clear(); + //way.clear(); flush(); - getButtons(conf->value(QString("start")).toString()); + way=conf->value(QString("start")).toStringList(); + getButtons(way.takeLast()); } MainWindow::~MainWindow() { @@ -141,7 +142,7 @@ void MainWindow::showExpanded() } void MainWindow::quit(){ qDebug()<<"quit()"; - conf->setValue(QString("start"), way.last()); + conf->setValue(QString("start"), QStringList(way)); //savButtons(); db.commit(); db.close(); -- 2.45.1