]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
mistake ...
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 18 Jun 2014 22:12:37 +0000 (00:12 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 18 Jun 2014 22:12:37 +0000 (00:12 +0200)
mainwindow.cpp

index ebacc372b77e9dda0e8cfbca50a879a33ad5ed26..37e40462317ce86188a5c3421a9774c0f47ce25b 100644 (file)
@@ -586,7 +586,7 @@ void MainWindow::get(const QString & d, const QString &b){
     QString a=b;lastprint=b;
     if((b[0]!='-')&&(b[0]!='+'))way.append(a);
     else a.remove(0, 1);
-    qDebug()<<"getButtons("<<a<<") way.size()"<<way.size();
+    qDebug()<<"get"<<d<<"("<<a<<") way.size()"<<way.size();
     if(b[0]!='+')flush();
 
 
@@ -859,10 +859,10 @@ void MainWindow::insert(const QString & a, const QString & keyword, const QStrin
     QVariant id=q->value(0);
     while(q->next()){
         //count++;
-        key+=" "+q->value(1).toString();
+        key=q->value(1).toString()+" "+key;
     }
-    if(!key.contains(keyword))key+=keyword;// it is possible to have 2 buttons with same label and action ? I've sayd "no"
-    if(deb)QMessageBox::information(this, trUtf8("action", "box title to debug insert"), QString("insert : key="+key+" label="+label+" action="+action));
+    if(!key.contains(keyword))key=key+" "+keyword;// it is possible to have 2 buttons with same label and action ? I've sayd "no"
+    if(deb)QMessageBox::information(this, trUtf8("action", "box title to debug insert"), trUtf8("insert : key="+key.toLocal8Bit()+" label="+label.toLocal8Bit()+" action="+action.toLocal8Bit(), "label to debug insert"));
     if(!id.isValid())exec(QList<QString>({conf->value(QString("add")+a).toString(), key, label, action}));
     else{exec(QList<QString>({conf->value(QString("update")+a).toString(), key, label, action, id.toString()}));
     };