| Summary: | kde standard application endless loop on File/Quit | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Eggert Ehmke <eggert> |
| Component: | kdevelop 2.x (obsolete) | Assignee: | KDevelop-Devel List <kdevelop-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Eggert Ehmke
2002-05-29 09:44:05 UTC
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 |