]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
editbuttons SQL select is now exactly like getbuttons SQL command
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 29 Apr 2014 06:24:58 +0000 (08:24 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Tue, 29 Apr 2014 06:24:58 +0000 (08:24 +0200)
mainwindow.cpp

index 50a00e220452c90c15ed0c83e1a02ba4cb85ce23..e1a315b9fc9a47d45df888e42a6f8a81c4187a58 100644 (file)
@@ -385,7 +385,8 @@ void MainWindow::chooseButtonDB(){
 }
 void MainWindow::chooseButtonDB(const QString & a){
     flush();
-    qDebug()<<"exec()="<<exec(QList<QString>({"select id,label from ui where keyword like ? order by id;", a}));
+    QString b="%"+a+"%";
+    qDebug()<<"exec()="<<exec(QList<QString>({"select id,label from ui where keyword like ? order by id;", b}));
     while (q->next()) {
         const QString action="edit "+q->value(0).toString();
         addWidget(action, new CLabel(q->value(1).toString(), conf->value(QString("button")).toString()));