From d23824dd0e05b2028c24271f832bea7fd887b947 Mon Sep 17 00:00:00 2001 From: Rafael Bachmann Date: Thu, 17 Dec 2015 19:00:14 +0100 Subject: [PATCH] add error message when opening log file fails --- ground/gcs/src/app/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ground/gcs/src/app/main.cpp b/ground/gcs/src/app/main.cpp index c8260c953..5fce67c8d 100644 --- a/ground/gcs/src/app/main.cpp +++ b/ground/gcs/src/app/main.cpp @@ -209,6 +209,11 @@ inline QString msgSendArgumentFailed() "Unable to send command line arguments to the already running instance. It appears to be not responding."); } +inline QString msgLogfileOpenFailed() +{ + return QCoreApplication::translate("Application", "Failed to open log file"); +} + // Prepare a remote argument: If it is a relative file, add the current directory // since the the central instance might be running in a different directory. inline QString prepareRemoteArgument(const QString &arg) @@ -313,7 +318,8 @@ void logInit(QString fileName) logStream = new QTextStream(file); qInstallMessageHandler(mainMessageOutput); } else { - // TODO error popup + displayError(msgLogfileOpenFailed()); + } }