Summary: | Kdevelop MDI wizard generates incorrect code for slotFileQuit() method | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | dragon |
Component: | kdevelop 2.x (obsolete) | Assignee: | KDevelop-Devel List <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | rosbacke |
Priority: | NOR | ||
Version: | 2.1 | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
dragon
2002-07-29 03:58:46 UTC
Not a problem with Gideon This only fixes the problem for qt3 but introduces a new bug for qt2. The original code depend on ~KMainWindow to be called (The closed widget must be deleted) to iterate over memberList. This is probably OK for qt2 but in qt3, the deletions are post-poned and the loop never iterates over the windows. However, using qt2 with the suggested fix would result in iterating over every second window which I would consider a bug (not confirmed). I would suggest the following code: QList<KMainWindow> tList(*memberList); for(w=tList.first(); w!=0; w=tList.next()) { // 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; } To replace the original code: 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; } //------------ This would work with both qt2 and qt3. --- Mikael Rosbacke (rosbacke(at)nada.kth.se) |