(*** This bug was imported into bugs.kde.org ***) Package: kdevelop Version: KDE 3.0.1 Severity: normal Installed from: SuSE RPMs Compiler: Not Specified OS: Linux OS/Compiler notes: Not Specified A kde normal application is generated. The function slotFileQuit in the <project>App class contains these statements: for(w=memberList->first(); w!=0; w=memberList->first()) if (!w-close()) ... This is an endless loop. Obviously the close function does not make the next window the first one as the comment some lines before suggests. (Submitted via bugs.kde.org)
As stated in the original bug report kdevelop templates generate=20 a broken slotFileQuit() function in the <project>App class. The=20 for loop doesn't iterate over memberList but instead gets stuck on the first item. Below is how the fixed for loop should iterate=20 (based on example in /usr/share/doc/qt3-doc/qptrlist.html). ~Scott ---------------------------------------------------------------------------= ---- void KwaveviewApp::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 clo= sing KMainWindow* w; if(memberList) { /* FIXED! FOR LOOP CHANGED FROM TEMPLATE BECAUSE PROGRAM WASN'T EXITIN= G PROPERLY */ //for(w=3DmemberList->first(); w!=3D0; w=3DmemberList->first()) // <= =3D Programs don't quit with these conditions because the loop gets stuck o= n the first list item for(w=3DmemberList->first(); w; w=3DmemberList->next()) { // only close the window if the closeEvent is accepted. If the user p= resses Cancel on the saveModified() dialog // the window and the application stay open. if(!w->close()) break; } } }
Fixed in gideon