Bug 228774

Summary: Close document with unsaved changes; Cancel doesn't cancel
Product: [Developer tools] kdevplatform Reporter: Niko Sams <niko.sams>
Component: shellAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: critical CC: open-development
Priority: VHI    
Version First Reported In: git master   
Target Milestone: 1.0.0   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Niko Sams 2010-02-27 17:00:01 UTC
steps to reproduce
- File -> New
- type "abc"
- File -> Close
- Cancel

Actual result:
- file gets closed

Expected result:
- file doesn't get closed
Comment 1 Niko Sams 2010-04-02 20:12:33 UTC
*** Bug 233076 has been marked as a duplicate of this bug. ***
Comment 2 Niko Sams 2010-04-02 21:14:04 UTC
I'm not sure but maybe only kdelibs 4.3 is effected.
Comment 3 Nikita Melnichenko 2010-04-02 21:22:00 UTC
Oh, good, you corrected severity! Didn't know you can do that. Thanks!

As for the bug, I'm using KDE 4.4.2, so it's true for kdelibs 4.4.
Comment 4 Andreas Pakulat 2010-04-07 23:34:57 UTC
What I could observe so far: There are two TextView's being deleted and hence they vanish. After that the TextDocument::close is called which in turn calls PartDocument::close which shows the dialog. It seems that these calls are being done too late.

I'm currently doing a git bisect, code from Dec. 1st last year is ok, start of Januar (4th) is already broken.
Comment 5 Andreas Pakulat 2010-04-08 00:06:12 UTC
An initial patch for the problem can be found here: http://lists.kde.org/?l=kdevelop-devel&m=126907091920856&w=2

Its not 100% working yet (see my reply to that message from a few minutes ago)
Comment 6 Andreas Pakulat 2010-04-18 19:07:02 UTC
SVN commit 1116112 by apaku:

Fix closing of changed documents.

When closing documents which had unsaved changes, kdevelop would close
it before it showed the question-dialog to save/close or cancel.

It introduces a new problem, that is it asks for confirmation more than
once, but since the bug fixed by this can loose your data I'm comitting
it none-theless for the 4.0 release.

BUG:228774

 M  +22 -1     area.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1116112