Stephan Witt wrote:
Andre Poenitz schrieb:
On Tue, Aug 21, 2007 at 10:31:57AM +0200, Stephan Witt wrote:
////////////////////////////////////////////////////////////////////////
// X11 specific stuff goes here...
#ifdef Q_WS_X11
+
+void GuiApplication::commitData(QSessionManager & sm)
+{
+ /// 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.
+ /// We are changeing that to write all unsaved buffers...
+ if ( sm.allowsInteraction() ) {
+ if ( !theBufferList().quitWriteAll() ) {
Spacing.
Thanks. Very clear. Did you try it?
I'll provide a modified patch when there is a need for.
Do you want the "if (sm.allowsInteraction()) {" style?
Yes, that's what he meant. I'll go even further ;-)
if (sm.allowsInteraction() && !theBufferList().quitWriteAll())
sm.cancel();
I am OK with the patch but I would like to know first if there are any
drawbacks, I am not on X11.
Abdel.