From 1419ee73b9797fb3cfc2bb57366181989fe6b2db Mon Sep 17 00:00:00 2001 From: Hiro Protagonist Date: Thu, 30 Mar 2017 15:55:49 +1300 Subject: [PATCH] yeah, close it, but close it right :) --- src/mainwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9e204ea..4bf180e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -92,15 +92,14 @@ void MainWindow::closeEvent ( QCloseEvent * event ) { if ( status == RECORDING ) { setStatus( STOPPING ); startStopRecording(); - recThread->quit(); - recThread->wait(); event->ignore(); - QTimer::singleShot( 1000, this, &MainWindow::close ); return; } - event->ignore(); + recThread->quit(); + recThread->wait(); + event->accept(); } void MainWindow::setStatus( STATUS status ) {