]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
added wri action (to write date in "file")
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sat, 21 Jun 2014 11:37:52 +0000 (13:37 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sat, 21 Jun 2014 11:37:52 +0000 (13:37 +0200)
mainwindow.cpp

index 2ab28f78eebab6b8ac8201572ccf509551072f91..72709c934a4465c340743d3e6ffa6798ef076015 100644 (file)
@@ -360,6 +360,14 @@ void MainWindow::action(const QString &a){
             mass(b[1], b[2], b[3], b[4]);
         }
     }
+    else if(b[0]==QString("wri")){
+        QFile tmp(conf->value(QString("file")).toString());
+        tmp.open(QIODevice::WriteOnly|QIODevice::Text);
+        QTextStream stream(&tmp);
+        stream<<c;
+        tmp.close();
+
+    }
     else if(b[0]==QString("debug")){
         debug();
     }
@@ -1005,7 +1013,7 @@ void MainWindow::mass(const QString & type, const QString & column, const QStrin
             exec2(tmp);
         }
     }
-    get(type, lastprint);
+    get(conf->value(QString("currenttype").toString(), lastprint);
 }
 void MainWindow::addDB(){
     addDB(conf->value(QString("currenttype")).toString());