More fixes around Python exit codes
This commit is contained in:
@@ -54,14 +54,13 @@
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
#include <App/Application.h>
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
GUIApplication::GUIApplication(int & argc, char ** argv, int exitcode)
|
||||
: GUIApplicationNativeEventAware(argc, argv), systemExit(exitcode)
|
||||
GUIApplication::GUIApplication(int & argc, char ** argv)
|
||||
: GUIApplicationNativeEventAware(argc, argv)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -82,8 +81,9 @@ bool GUIApplication::notify (QObject * receiver, QEvent * event)
|
||||
else
|
||||
return QApplication::notify(receiver, event);
|
||||
}
|
||||
catch (const Base::SystemExitException&) {
|
||||
qApp->exit(systemExit);
|
||||
catch (const Base::SystemExitException &e) {
|
||||
caughtException.reset(new Base::SystemExitException(e));
|
||||
qApp->exit(e.getExitCode());
|
||||
return true;
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
@@ -225,8 +225,8 @@ public:
|
||||
bool running;
|
||||
};
|
||||
|
||||
GUISingleApplication::GUISingleApplication(int & argc, char ** argv, int exitcode)
|
||||
: GUIApplication(argc, argv, exitcode),
|
||||
GUISingleApplication::GUISingleApplication(int & argc, char ** argv)
|
||||
: GUIApplication(argc, argv),
|
||||
d_ptr(new Private(this))
|
||||
{
|
||||
d_ptr->setupConnection();
|
||||
|
||||
Reference in New Issue
Block a user