From: Norbert Moutarde Date: Sat, 24 May 2014 07:01:48 +0000 (+0200) Subject: I've removed action("run"), and multiple action is separated by !q! (as X-Git-Url: https://git.nothing2do.fr/?a=commitdiff_plain;h=7811a34fae5d6135431ec6514a3ebdafa182b887;p=diary-mobile.git I've removed action("run"), and multiple action is separated by !q! (as before) --- diff --git a/mainwindow.cpp b/mainwindow.cpp index 58de54f..db1a45d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -166,7 +166,13 @@ void MainWindow::action(const QString &a){ QStringList b=a.split(QString(" ")); QString c=a; c.remove(0,4); - if (b[0]==QString("set")){ + int part=a.count(QString("!q!")); + if(part){ + for(int d=0; d<=part; d++){ + action(c.split(QString("!q!"))[d]); + } + } + else if(b[0]==QString("set")){ conf->setValue(b[1], b[2]); } else if(b[0]==QString("settext")){ @@ -195,12 +201,7 @@ void MainWindow::action(const QString &a){ way.removeLast(); getButtons(way.takeLast()); } - } - else if(b[0]==QString("run")){ - for(int d=0; d<=a.count(QString("!q!")); d++){ - action(c.split(QString("!q!"))[d]); - } - } + } else if(b[0]==QString("setfile")){ bool ok; QString e=QFileDialog::getSaveFileName(this, QString("get file"), conf->value(b[1]).toString());