Bug#45885: Kdevelop MDI wizard generates incorrect code for slotFileQuit() method
dragon at panix.com
dragon at panix.com
Mon Jul 29 06:04:02 UTC 2002
Package: kdevelop
Version: 2.1 (using KDE 3.0.0 )
Severity: normal
Installed from: Red Hat Linux 7.2.93
Compiler: gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
OS: Linux (i686) release 2.4.18-5
OS/Compiler notes:
The code generated by kdevelop MDI KDE wizard for the method has a programing error
The following loop is the problem:
for(w=memberList->first(); w!=0; w=memberList->first())
It nevers end.
I find that if I replace the code with
for(w=memberList->first(); w!=0; w=memberList->next())
The my program will exit.
The following is the current code being generated by the KDE MDI wizard
void Junk2App::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."));
}
(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
(Complete bug history is available at http://bugs.kde.org/db/45/45885.html)
More information about the KDevelop-devel
mailing list