From aea0bca7003b0c34eb37e9913aa64dfc404df876 Mon Sep 17 00:00:00 2001 From: Norbert Moutarde Date: Wed, 9 Apr 2014 22:11:00 +0200 Subject: [PATCH] removed the capacity to double push on "back buttons" to quit, --- mainwindow.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index d131ed6..90f1a0a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -289,8 +289,8 @@ void MainWindow::entry(const QString &a){ } context.append(way[way.size()-1]); //qDebug()<<"context="<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()="<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="<