Am Samstag, 27. Mai 2006 15:20 schrieb Abdelrazak Younes: > Another idea... Maybe the QApplication destruction is happening too soon > in the exit process, this patch remove the QLApplication destructor.
This was the right idea. The 'static' LQApplication changed the destruction order in a way qt does not like. The attached patch fixes this. Please take ownership of this and commit a suitable fix. Georg
Index: src/frontends/qt4/lyx_gui.C =================================================================== --- src/frontends/qt4/lyx_gui.C (Revision 13939) +++ src/frontends/qt4/lyx_gui.C (Arbeitskopie) @@ -152,6 +152,13 @@ bool LQApplication::macEventFilter(Event #endif +namespace { + +LQApplication * app = 0; + +} + + namespace lyx_gui { bool use_gui = true; @@ -161,16 +168,16 @@ void parse_init(int & argc, char * argv[ // Force adding of font path _before_ QApplication is initialized FontLoader::initFontPath(); - static LQApplication app(argc, argv); + app = new LQApplication(argc, argv); // install translation file for Qt built-in dialogs // These are only installed since Qt 3.2.x static QTranslator qt_trans(0); if (qt_trans.load(QString("qt_") + QTextCodec::locale(), qInstallPathTranslations())) { - app.installTranslator(&qt_trans); + qApp->installTranslator(&qt_trans); // even if the language calls for RtL, don't do that - app.setReverseLayout(false); + qApp->setReverseLayout(false); lyxerr[Debug::GUI] << "Successfully installed Qt translations for locale " << QTextCodec::locale() << std::endl; @@ -274,6 +281,7 @@ void start(string const & batch, vector< delete lyxsocket; delete lyxserver; lyxserver = 0; + delete app; }