diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 7599fc92d9..2ea975a6ee 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-12-20 John Levon + + * lyx_gui.C: fix exit to use std::exit, so we don't + end up back in the LyX code + 2002-12-19 John Levon * ui/QPrefsDialog.ui: remove auto-default stuff - it was diff --git a/src/frontends/qt2/lyx_gui.C b/src/frontends/qt2/lyx_gui.C index 321069453f..e6d2d1bac0 100644 --- a/src/frontends/qt2/lyx_gui.C +++ b/src/frontends/qt2/lyx_gui.C @@ -51,6 +51,7 @@ #include #include +#include #ifndef CXX_GLOBAL_CSTD using std::exit; @@ -93,13 +94,16 @@ public: #endif }; + LQApplication::LQApplication(int &argc, char **argv) : QApplication( argc, argv ) {} + LQApplication::~LQApplication() {} + void lyx_gui::parse_init(int & argc, char * argv[]) { static LQApplication a(argc, argv); @@ -165,7 +169,12 @@ void lyx_gui::start(string const & batch, vector const & files) void lyx_gui::exit() { - qApp->exit(0); + // we cannot call qApp->exit(0) - that could return us + // into a static dialog return in the lyx code (for example, + // load autosave file QMessageBox. We have to just get the hell + // out. + + ::exit(0); }