Hello Lars,

> You had a simple fix that avoids the crash, didn't you Stephan?

yes I have.

Yesterday I came back to Berlin and since today I'm online again...

After a vacation of 2 weeks I have to do some real work.
But I'll provide the patch shortly. In Paris I failed to
compile the patched version because of an incomplete
update or bad precompiled headers or whatever, I don't
know. So I didn't check it in (with Michaels account).
Now it compiles again and I send you the patch.

Regards,

Stephan
--
Index: src/frontends/qt2/lyx_gui.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/lyx_gui.C,v
retrieving revision 1.86
diff -u -p -r1.86 lyx_gui.C
--- src/frontends/qt2/lyx_gui.C 2005/07/16 15:55:35     1.86
+++ src/frontends/qt2/lyx_gui.C 2005/07/22 11:38:42
@@ -51,6 +51,7 @@
 #endif
 
 #include <qapplication.h>
+#include <qsessionmanager.h>
 #if QT_VERSION >= 0x030100
 #include <qeventloop.h>
 #endif
@@ -114,6 +115,7 @@ class LQApplication : public QApplicatio
 public:
        LQApplication(int & argc, char ** argv);
        ~LQApplication();
+       void commitData(QSessionManager & sm);
 #ifdef Q_WS_X11
        bool x11EventFilter (XEvent * ev) { return lyxX11EventFilter(ev); }
 #endif
@@ -140,6 +142,28 @@ LQApplication::~LQApplication()
        if (locked())
                unlock();
 #endif
+}
+
+
+void LQApplication::commitData(QSessionManager & sm)
+{
+       /// Maybe someone should do something sensible here.
+       /// The implementation is required to avoid an application exit
+       /// when session state save is triggered by session manager.
+       /// The default implementation sends a close event to all
+       /// visible top level widgets when session managment allows
+       /// interaction.
+       ///
+       /// Following is a (currently not working) proposal...
+       /// The problem is a blocking application when
+       /// BufferList::quitWriteAll wants to open the question
+       /// alert message dialog.
+       /// Qt doesn't return from it and no box is opened.
+       /// if ( sm.allowsInteraction() ) {
+       ///     if ( !bufferlist.quitWriteAll() ) {
+       ///             sm.cancel();
+       ///     }
+       /// }
 }
 
 

Reply via email to