]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
little cosmetic change (useless)
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sun, 26 Oct 2014 21:02:16 +0000 (22:02 +0100)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sun, 26 Oct 2014 21:02:16 +0000 (22:02 +0100)
mainwindow.cpp
mainwindow.h

index 9e7fb1131582c6487f4a3b513b6a004e60214f10..16c50994286dde47a00fbafed2f9677248c0e685 100644 (file)
@@ -194,7 +194,7 @@ void MainWindow::action(const QString &a){
             return;
         }
         //QString z=d+" will be changed to "+e;
-        if(conf->value(QString("saychange")).toBool())QMessageBox::information(this, trUtf8("variable text change", "title to warn about variable content change"), trUtf8("value of "+d.toLocal8Bit()+" changed to "+e.toLocal8Bit(), "text to warn about variable content change"));
+        if(conf->value(QString("saychange")).toBool()||deb)QMessageBox::information(this, trUtf8("variable text change", "title to warn about variable content change"), trUtf8("value of "+d.toLocal8Bit()+" changed to "+e.toLocal8Bit(), "text to warn about variable content change"));
         conf->setValue(d, e);
     }
     else if(b[0]==QString("setint")){
@@ -519,7 +519,7 @@ void MainWindow::firstrun(){
     conf->setValue(QString("start"), QVariant("begin"));
     conf->setValue(QString("restore"), QVariant("http://www.abc.de/db"));
     conf->setValue(QString("db"), QVariant("/data/data/eu.nothing2do.diarymobile/files/db"));
-    conf->setValue(QString("selectbuttons"), QVariant("select keyword,label,action from buttons order by label;"));
+    conf->setValue(QString("selectbuttons"), QVariant("select keyword,label,action from buttons order by id;"));
     conf->setValue(QString("sqlbuttons"), QVariant("INSERT INTO buttons (keyword,label,action) VALUES(?,?,?);"));
     conf->setValue(QString("selectraw"), QVariant("select date,texte from raw order by date;"));
     conf->setValue(QString("menuback"), QVariant("-menuback"));
@@ -852,7 +852,7 @@ void MainWindow::sav(const QString & a){
     exec(QList<QString> ({conf->value(QString("select")+a).toString()}));
     QString tmp="file"+a;
     QFile b(conf->value(tmp).toString());
-    b.open(QIODevice::WriteOnly/*|QIODevice::Text*/);
+    b.open(QIODevice::WriteOnly);
     QTextStream c(&b);
     //int d=conf->value(QString("column")+a).toInt()-1;
     int d=q->record().count()-1;
@@ -866,7 +866,7 @@ void MainWindow::sav(const QString & a){
     b.close();
     QUrl upload(QString("ftp://")+conf->value(QString("userftp")).toString()+QString(":")+conf->value(QString("passftp")).toString()+QString("@")+conf->value(QString("hostftp")).toString()+QString("/")+conf->value(QString("file")+a).toString());
     net=new QNetworkAccessManager(this);
-    b.open(QIODevice::ReadOnly /*| QIODevice::Text*/);
+    b.open(QIODevice::ReadOnly);
     rep=net->put(QNetworkRequest(upload), b.readAll());
     qDebug()<<"net->put : "<<rep<< " upload : "<<upload.url();
     connect(rep, SIGNAL(finished()), this, SLOT(Uisent()));
index 9cbf5ea092401cdbe2d0ad19072b1bc66e8a99cd..e941f330c38eedc9e6deaf7cbaf205f95412320c 100644 (file)
@@ -180,8 +180,7 @@ private slots:
     void sendRAW();
     void RAWsent();
     void Uisent();
-    //void sav(const QString &);
-    //void savButtons();
+    //void savButtons(); now, it's sav(QString("buttons"))
     void savData();
     void read(const QString &, const QByteArray &);
     void downloadDB();