Bug in KDevelop KDE templates or KDE app framework? -- bug found !

Pascal.Niklaus at unibas.ch Pascal.Niklaus at unibas.ch
Sat May 5 08:07:21 BST 2001


I finally found the bug which causes the crashs on 'Quit' in KDevelops MDI 
framework... I was just searching at the wrong place all the time ;-)

The final slotStatusMsg(...) call in slotFileQuit causes the crash, I guess 
because it comes to late because the statusbar or some structure has already 
been destroyed by the calls to w->close().

Simply removing this call solves the problem.

Pascal
 

void Mdidbg_okApp::slotFileQuit()
{
  slotStatusMsg(i18n("Exiting..."));
  saveOptions();
  // close the first window, the list makes the next one the first again.
  // This ensures that queryClose() is called on each window to ask for closing
  KMainWindow* w;
  if(memberList)
  {
    for(w=memberList->first(); w!=0; w=memberList->first())
    {
      // only close the window if the closeEvent is accepted. If the user 
presses Cancel on the saveModified() dialog,
      // the window and the application stay open.
      if(!w->close())
        break;
    }
  }	
  slotStatusMsg(i18n("Ready."));   // <=== CAUSES CRASH  !!!
}



-------------------------------------------------
This mail sent through IMP: igor.urz.unibas.ch

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list