From: Norbert Moutarde Date: Mon, 21 Sep 2015 19:52:56 +0000 (+0200) Subject: bug correction (action unmodifiable), X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=6456780bedca340fa95799c294c0e91dba8f5c32;p=diary-mobile.git bug correction (action unmodifiable), --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 0b6e592..329eb6e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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;