]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
removed the capacity to double push on "back buttons" to quit,
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 9 Apr 2014 20:11:00 +0000 (22:11 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Wed, 9 Apr 2014 20:11:00 +0000 (22:11 +0200)
mainwindow.cpp

index d131ed697797eea6738a63f09decba39a5c01a0c..90f1a0af706ac39570cded5961620dae875c4e6f 100644 (file)
@@ -289,8 +289,8 @@ void MainWindow::entry(const QString &a){
     }
     context.append(way[way.size()-1]);
     //qDebug()<<"context="<<context;
-    if(a=="")label=" + ";
-    else label=a+" : ";
+    if(a=="")label=context+" : ";
+    else label=context+", "+a+" : ";
     entry=QInputDialog::getText(this, QString("nouvelle entrée"), label, QLineEdit::Normal, "", &ok);
     if(ok==0)return;
     QString c;
@@ -393,7 +393,7 @@ void MainWindow::sendRAW(){
         b<<q->value(1).toString()<<"\n";
     }
     a.close();
-    QMessageBox::information(this, QString("end"), conf->value(QString("file")).toString());
+    //QMessageBox::information(this, QString("end"), conf->value(QString("file")).toString());
     qDebug()<<"a.open()="<<a.open(QIODevice::ReadOnly | QIODevice::Text);
 
     QUrl upload(conf->value(QString("uploadRAW")).toString());
@@ -422,15 +422,14 @@ void MainWindow::back(){
 }
 void MainWindow::keyReleaseEvent(QKeyEvent *event)
 {
-    static bool accepted=true;
-    if(accepted==false)quit();
-    event->setAccepted(accepted); // don't close my Top Level Widget !
+    //static bool accepted=true;
+    event->setAccepted(true); // don't close my Top Level Widget !
     int k=event->key();
     qDebug()<<"key pressed="<<k;
     if (k==Qt::Key_Back)
     {
         back();
-        accepted=false;// close the app next time when the user press back button
+        //accepted=false;// close the app next time when the user press back button
     }
 
 }