diff --git a/src/GUI/MessageBox.cxx b/src/GUI/MessageBox.cxx index 1d8e5742f..0a36688a6 100644 --- a/src/GUI/MessageBox.cxx +++ b/src/GUI/MessageBox.cxx @@ -148,16 +148,16 @@ MessageBoxResult modalMessageBox(const std::string& caption, #endif } -[[noreturn]] void fatalMessageBox(const std::string& caption, - const std::string& msg, - const std::string& moreText) +MessageBoxResult fatalMessageBox(const std::string& caption, + const std::string& msg, + const std::string& moreText) { #if defined(SG_WINDOWS) - win32MessageBox(caption, msg, moreText); + return win32MessageBox(caption, msg, moreText); #elif defined(SG_MAC) - cocoaFatalMessage(msg, moreText); + return cocoaFatalMessage(msg, moreText); #elif defined(HAVE_QT) - QtMessageBox(caption, msg, moreText, true); + return QtMessageBox(caption, msg, moreText, true); #else std::string s = "FATAL: "+ msg; if (!moreText.empty()) { @@ -171,9 +171,8 @@ MessageBoxResult modalMessageBox(const std::string& caption, dlg->setStringValue("text/label", s ); _gui->showDialog("popup"); } + return MSG_BOX_OK; #endif - - std::abort(); } } // of namespace flightgear diff --git a/src/GUI/MessageBox.hxx b/src/GUI/MessageBox.hxx index 0811ceef0..686b53b78 100644 --- a/src/GUI/MessageBox.hxx +++ b/src/GUI/MessageBox.hxx @@ -17,7 +17,7 @@ MessageBoxResult modalMessageBox(const std::string& caption, const std::string& msg, const std::string& moreText = std::string()); -[[noreturn]] void fatalMessageBox(const std::string& caption, +MessageBoxResult fatalMessageBox(const std::string& caption, const std::string& msg, const std::string& moreText = std::string()); diff --git a/tests/testStubs.cxx b/tests/testStubs.cxx index 1f8a3e702..84b9522d3 100644 --- a/tests/testStubs.cxx +++ b/tests/testStubs.cxx @@ -113,11 +113,11 @@ namespace flightgear return MSG_BOX_OK; } - [[noreturn]] void fatalMessageBox(const std::string& caption, + MessageBoxResult fatalMessageBox(const std::string& caption, const std::string& msg, const std::string& moreText) { - std::abort(); + return MSG_BOX_OK; } }