From: Norbert Moutarde Date: Thu, 7 Aug 2014 18:29:42 +0000 (+0200) Subject: few tweak (with destructor) X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=7af664cee4783163f0149ca462978015ea8c1102;p=diary-mobile.git few tweak (with destructor) --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 72709c9..46a581b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -78,11 +78,20 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) //start(); } void MainWindow::start(){ + QString a=conf->value(QString("currenttype")).toString(); way=conf->value(QString("start")).toStringList(); - if(!way.isEmpty())get(conf->value(QString("currenttype")).toString(), way.takeLast()); + QString b=way.last(); + qDebug()<<"a="<quit(); + } void MainWindow::setOrientation(ScreenOrientation orientation) { @@ -137,12 +146,8 @@ void MainWindow::showExpanded() #endif } void MainWindow::quit(){ - qDebug()<<"quit()"; - conf->setValue(QString("start"), way); - //savButtons(); - db.commit(); - db.close(); - qApp->quit(); + qDebug()<<"quit() way.last()="<~MainWindow(); } const CLabel* MainWindow::addWidget(const QString &key, const CLabel *a){ qDebug()<<"addWidget("<({"delete from raw;"})); @@ -1013,7 +1017,7 @@ void MainWindow::mass(const QString & type, const QString & column, const QStrin exec2(tmp); } } - get(conf->value(QString("currenttype").toString(), lastprint); + get(conf->value(QString("currenttype")).toString(), lastprint); } void MainWindow::addDB(){ addDB(conf->value(QString("currenttype")).toString());