kmainwindow close problem

John Birch jbb at kdevelop.org
Wed Oct 11 18:52:51 UTC 2000


Hi,

There seems to be a problem in closing an app that has two KMainWindows. One 
such app is kdevelop, (probably the only one).

in KMainWindow::closeEvent() there's the following test

       QListIterator<KMainWindow> it(*KMainWindow::memberList);
       for (it.toFirst(); it.current(); ++it){
            if ( !it.current()->testWState( WState_ForceHide ) &&
                        it.current() != this )
                not_withdrawn++;
        }

With two KMainWindows "it.current() != this" will always be true for one of 
the KMainWindows (the state is never ForceHide), which means the app never 
tries to close. If the KMainWindow flags are set to WDestructiveClose then 
the libs are unloaded (on a timeout) but the app still won't finish.

I suspect this is a bug in KMainWindow but I'm unsure how to fix this, (and 
more to the point if I understand it correctly).

Any (pertinent :-) advise?

Thanks,

jbb

BTW Setting the not_withdrawn flag to 0 just leads to a segfault later




More information about the KDevelop-devel mailing list