From: Norbert Moutarde Date: Fri, 30 May 2014 21:07:17 +0000 (+0200) Subject: all the content is saved on quit (and restored on run) X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=8391aa4d79891b47969f59d39c5829eb27b7e923;p=diary-mobile.git all the content is saved on quit (and restored on run) --- 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();