Georg Baum wrote:
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. I am not sure this will solve the crash but your backtrace seems to imply so. If not, I think we will maybe have to get rid of this
QLApplication...

That does not help. I tried it, too, but then the compiler generates a destructor.

OK, then this patch use a straight QApplication. QLApplication is used only for Mac as far as I see. And use qApp only.

Abdel.
Index: lyx_gui.C
===================================================================
--- lyx_gui.C   (revision 13933)
+++ lyx_gui.C   (working copy)
@@ -112,7 +112,7 @@
 {
 public:
        LQApplication(int & argc, char ** argv);
-       ~LQApplication();
+//     ~LQApplication();
 #ifdef Q_WS_X11
        bool x11EventFilter (XEvent * ev) { return lyxX11EventFilter(ev); }
 #endif
@@ -133,8 +133,8 @@
 }
 
 
-LQApplication::~LQApplication()
-{}
+//LQApplication::~LQApplication()
+//{}
 
 
 #ifdef Q_WS_MACX
@@ -161,16 +161,16 @@
        // Force adding of font path _before_ QApplication is initialized
        FontLoader::initFontPath();
 
-       static LQApplication app(argc, argv);
+       static QApplication app(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;

Reply via email to