]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
fix mistake and added the ability to cancel when multiple choice
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 7 May 2014 19:39:06 +0000 (21:39 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 7 May 2014 19:39:06 +0000 (21:39 +0200)
mainwindow.cpp

index c83f73ad8d98593caa61ad9e5ce6ebfba5f0fcca..fd9a45dfe2296a4b16bbc2439fc9c0b702f8f5de 100644 (file)
@@ -154,8 +154,9 @@ void MainWindow::action(const QString &a){
         entry(c);
     }
     else if(b[0]==QString("a/b")){
-        QString e=QInputDialog::getItem(this, QString("choice"), QString("On vous offre un choix."), c.split(QString("<q>")), 0, 0);
-        action(e);
+        bool ok;
+        QString e=QInputDialog::getItem(this, QString("choice"), QString("On vous offre un choix."), c.split(QString("<q>")), 0, 1, &ok);
+        if(ok)action(e);
     }
     else if(b[0]=="back"){
         if(way.size()>=2){
@@ -165,7 +166,7 @@ void MainWindow::action(const QString &a){
     }
     else if(b[0]=="run"){
         for(int d=0; d<=a.count(QString("<q>")); d++){
-            action(b.split(QString("<q>"))[d]);
+            action(c.split(QString("<q>"))[d]);
         }
     }
     else if(b[0]=="setfile"){