]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
multiple push on button don't write multiple action on way[]
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sat, 1 Oct 2016 09:58:59 +0000 (11:58 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Sat, 1 Oct 2016 09:58:59 +0000 (11:58 +0200)
mainwindow.cpp

index 1e9511b740c7be37a030c0550473be8acb2397e6..931b6b96c745a381f80f57c18497ee0161e7bfdb 100644 (file)
@@ -804,6 +804,7 @@ void MainWindow::chooseDB(const QString & a,const QString & b){
     flush();
     QString c="%"+b+"%";
     qDebug()<<"exec()="<<exec(QList<QString>({conf->value(QString("choose"+a)).toString(), c}));
+
     while (q->next()) {
         const QString action="edit "+q->value(0).toString();
         addWidget(action, new CLabel(q->value(1).toString(), *conf));
@@ -904,7 +905,7 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
             beforekey=lastprint;
             action(a);
         }else{
-            action(beforekey);
+            action(QString("-"+beforekey));
         };
     }else if(k==Qt::Key_Back){
         const QString a=conf->value(QString("menuback"), QString("")).toString();
@@ -913,7 +914,7 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
             beforekey=lastprint;
             action(a);
         }else{
-            action(beforekey);
+            action(QString("-"+beforekey));
         };
     }else if(k==Qt::Key_VolumeDown){
         qDebug()<<"keyvolumdown";
@@ -923,7 +924,7 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
             beforekey=lastprint;
             action(a);
         }else{
-            action(beforekey);
+            action(QString("-"+beforekey));
         };
     }else if(k==Qt::Key_VolumeUp){
         const QString a=conf->value(QString("volumup"), QString("")).toString();
@@ -932,7 +933,7 @@ void MainWindow::keyReleaseEvent(QKeyEvent *event)
             beforekey=lastprint;
             action(a);
         }else{
-            action(beforekey);
+            action(QString("-"+beforekey));
         };
     };
     event->setAccepted(accepted);
@@ -1282,10 +1283,6 @@ bool MainWindow::printItem(const QSqlQuery & a){
         };
         i++;
     }while(a.next());
-    //grid->update();
-    //scroll->updateGeometry();
-    //screen->updateGeometry();
-
     qDebug()<<"end printItem : "<<i<<" button(s) way.size()"<<way.size()<<" page : "<<page;
     return 0;
 }