call onQuit() directly whem timer runs out
This commit is contained in:
parent
ef88fdc9a4
commit
c6e98f50c2
@ -28,7 +28,8 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
|
||||
m_exitTimer->start(1800 * 1000);
|
||||
|
||||
connect(m_startTimer, SIGNAL(timeout()), ui->start, SLOT(click()));
|
||||
connect(m_exitTimer, SIGNAL(timeout()), ui->exit, SLOT(click()));
|
||||
//connect(m_exitTimer, SIGNAL(timeout()), ui->exit, SLOT(click()));
|
||||
connect(m_exitTimer, SIGNAL(timeout()), ui->exit, SLOT(onQuit()));
|
||||
connect(ui->start, SIGNAL(clicked()), m_worker, SLOT(update()));
|
||||
connect(ui->exit, SIGNAL(clicked()), this, SLOT(onQuit()));
|
||||
connect(m_worker, SIGNAL(disableExit()), this, SLOT(onDisableExit()));
|
||||
@ -76,10 +77,10 @@ void MainWindow::onRestartExitTimer() {
|
||||
}
|
||||
|
||||
void MainWindow::onQuit() {
|
||||
if (!m_worker->updateProcessRunning()) {
|
||||
// qApp->quit();
|
||||
// if (!m_worker->updateProcessRunning()) {
|
||||
qCritical() << "ON QUIT: EXIT CODE" << QString::number(m_worker->returnCode());
|
||||
qApp->exit(m_worker->returnCode());
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
void MainWindow::onSetProgress(quint8 v) {
|
||||
@ -108,5 +109,5 @@ void MainWindow::onAppendText(QString text, QString suffix) {
|
||||
}
|
||||
|
||||
void MainWindow::onShowErrorMessage(QString title, QString text) {
|
||||
QMessageBox::critical(this, title, text, QMessageBox::Ok);
|
||||
// QMessageBox::critical(this, title, text, QMessageBox::Ok);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user