Kdevelop 2.1, KDE3-beta2, hang in slotFileQuit() in App-class

Maximilian Hrabowski maximilian at hrabowski.net
Mon Feb 25 11:05:05 UTC 2002


Hi,

I'm using qt-3.0.2, kde3-beta2 and the kdevelop-2.1 that comes with it.
A template app created with the wizard hangs on Quit (MDI AND Normal).
The NormalApp quits with Menu->File->close and hangs with Menu->File->Quit.
The MDIApp hangs on Menu->File->Quit.

As it seems the problem is in slotFileQuit() in the AppClass:

void TestMDIApp::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."));
}

The program hangs in the for-loop, because *w is never deleted and w->close() 
never returns false().
The problem seems to be in QWidget::close() which has slightly changed from Qt 
2.X.X : The caller "TestMDIApp" is not recognized as the "mainWindow()" and 
so  the flag "isMain" is not set inside QWidget::close(). But I don't know 
whether this is the problem, it's just an assumption.

Alas I'm not even sure whether this is a kdevelop problem, a kde3 problem or a 
qt-3.0.2 problem.

Any ideas, hints?

Maxim





More information about the KDevelop-devel mailing list