]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
bug correction (action unmodifiable),
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Mon, 21 Sep 2015 19:52:56 +0000 (21:52 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Mon, 21 Sep 2015 19:52:56 +0000 (21:52 +0200)
mainwindow.cpp

index 0b6e5925bfba05d106efdab17d9ca92177f26bb2..329eb6e7bc37f07786486eab7aa629b2b24d3a4e 100644 (file)
@@ -446,10 +446,10 @@ void MainWindow::action(const QString &a){
                     addWidget(QString("box "+tmpkeys[a]), new CLabel(tmpvalues[a], *conf));
                     if(deb)QMessageBox::information(this, QString("val"), QString(tmpkeys[a]+"=="+tmpvalues[a]));
                 }
-            }else if(b[2]=QString("?")){
-                QString val;
-                val=QInputDialog::getText(this, "set", trUtf8("Variable's name ?", "text to ask value's name before changing it (set)"), QLineEdit::Normal, QString(""), &ok);
-                if(ok)action(QString("val"+b[1]+" "+val));S
+            }else if(b[2]==QString("?")){
+                QString val,tmp="Enter value for "+QString(b[1]);
+                val=QInputDialog::getText(this, "val", trUtf8(tmp.toLocal8Bit().constData(), "text to ask value's name before changing it (val)"), QLineEdit::Normal, QString(""), &ok);
+                if(ok)action(QString("val "+b[1]+" "+val));
             }
             else{
                 for(int a=0;a<((bs-1)/2); a++){
@@ -777,7 +777,7 @@ void MainWindow::editDB(const QString & a, const QString & b){
     else tmplabel=QInputDialog::getText(this, trUtf8("label", "Title of box where ask for button's label"), trUtf8("new label", "question to get new button's label"), QLineEdit::Normal, label, &ok);
     if(!ok)return;
 
-    if(conf->value(QString("multiline")).toBool())const QString tmpaction=QInputDialog::getMultiLineText(this, trUtf8("action", "Title of box where ask for button's action"), trUtf8("new action", "question to get new button's action"), action, &ok);
+    if(conf->value(QString("multiline")).toBool())tmpaction=QInputDialog::getMultiLineText(this, trUtf8("action", "Title of box where ask for button's action"), trUtf8("new action", "question to get new button's action"), action, &ok);
     else tmpaction=QInputDialog::getText(this, trUtf8("action", "Title of box where ask for button's action"), trUtf8("new action", "question to get new button's action"), QLineEdit::Normal, action, &ok);
     if(!ok)return;