[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [FIX-PATCH] Crash when logging out and apps were open
From:       "=?UTF-8?Q?Rafael_Fern=C3=A1ndez_L=C3=B3pez?=" <ereslibre () gmail ! com>
Date:       2007-09-06 13:45:07
Message-ID: 93f85fee0709060645u1443b246x41c97cd29bb6d6d9 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

Hi all,

Dimsuz reported a problem when logging out. Run kuiserver (or make it
run), konsole or whatever has a KMainWindow.

When they're still running, log out.

I was able to reproduce the problem and fix it.

Is this OK to commit?


Bye,
Rafael Fernández López.

["noCrashWhenLoggingOut.diff" (text/x-diff)]

Index: kdeui/widgets/kmainwindow.cpp
===================================================================
--- kdeui/widgets/kmainwindow.cpp	(revisión: 708980)
+++ kdeui/widgets/kmainwindow.cpp	(copia de trabajo)
@@ -160,7 +160,6 @@
 
             for (QList<KMainWindow*>::ConstIterator it = \
KMainWindow::memberList().constBegin(); it != KMainWindow::memberList().constEnd()  \
&& !canceled; ++it) {  KMainWindow *window = *it;
-                ++it; // Update now, the current window might get deleted
                 if ( !window->testAttribute( Qt::WA_WState_Hidden ) ) {
                     QCloseEvent e;
                     QApplication::sendEvent( window, &e );
@@ -186,7 +185,7 @@
                return false;
 
             KMainWindow* last = 0;
-            for (QList<KMainWindow*>::ConstIterator it = \
KMainWindow::memberList().constBegin(); it != KMainWindow::memberList().constEnd()  \
&& !canceled; ++it) { +            for (QList<KMainWindow*>::ConstIterator it = \
KMainWindow::memberList().constBegin(); it != KMainWindow::memberList().constEnd(); \
++it) {  KMainWindow *window = *it;
                 if ( !window->testAttribute( Qt::WA_WState_Hidden ) ) {
                     last = window;
@@ -204,7 +203,7 @@
 };
 
 K_GLOBAL_STATIC(KMWSessionManager, ksm)
-static QList<KMainWindow*> sMemberList; // ##### isn't the static object a problem?
+static QList<KMainWindow*> sMemberList;
 static bool being_first = true;
 
 KMainWindow::KMainWindow( QWidget* parent, Qt::WFlags f )



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic