From 9f2c004b6c3c166e0b15b1d54dc222608b65b13c Mon Sep 17 00:00:00 2001 From: Basil Huber Date: Tue, 17 Feb 2015 18:43:31 +0100 Subject: [PATCH] Replace QMessageBox::warning by QGCApplication::criticalMessageBoxOnMainThread and removed unnecessary copying action --- src/QGCApplication.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index afc88891d..6029ce901 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -498,12 +498,20 @@ void QGCApplication::saveTempFlightDataLogOnMainThread(QString tempLogfile) if(QFile::exists(saveFilename) && !QFile::remove(saveFilename)){ // if the file cannot be removed, prompt user and ask new path saveError = true; +<<<<<<< Updated upstream QMessageBox::warning (MainWindow::instance(), "File Error","Could not overwrite existing file.\nPlease provide a different file name to save to."); QFile::copy(tempLogfile, saveFilename); } else if(!QFile::copy(tempLogfile, saveFilename)) { // if file could not be copied, prompt user and ask new path saveError = true; QMessageBox::warning (MainWindow::instance(), "File Error","Could not create file.\nPlease provide a different file name to save to."); +======= + QGCApplication::criticalMessageBoxOnMainThread("File Error","Could not overwrite existing file.\nPlease provide a different file name to save to."); + } else if(!QFile::copy(tempLogfile, saveFilename)) { + // if file could not be copied, prompt user and ask new path + saveError = true; + QGCApplication::criticalMessageBoxOnMainThread("File Error","Could not create file.\nPlease provide a different file name to save to."); +>>>>>>> Stashed changes } } } while(saveError); // if the file could not be overwritten, ask for new file -- 2.22.0