Bug 291091

Summary: KDevelop won't ask to save when closing an unsaved document
Product: [Developer tools] kdevplatform Reporter: Alexander <ashaduri>
Component: shellAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: major CC: niko.sams
Priority: VHI    
Version: git master   
Target Milestone: 1.2.3   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexander 2012-01-09 22:09:15 UTC
Version:           git master (using KDE 4.7.2) 
OS:                Linux

I'm using KDevelop git master (2012-01-09).

After upgrading to KDE 4.7, KDevelop closes unsaved documents without warning, leaving behind kate swap files in the process.

This may be somehow related to bug #291089.

Reproducible: Always

Steps to Reproduce:
Open some document, type something, click the close button on the tab.

Actual Results:  
The document is closed, with .kate-swp file left on the disk. When opening the file again, KDevelop offers to recover the changes.

Expected Results:  
A dialog should appear asking whether we want to save the file or not. If the user says no, no .kate-swp file should be left on the disk.

openSUSE 12.1 x86-64
Comment 1 Niko Sams 2012-01-14 07:50:41 UTC
*** Bug 291089 has been marked as a duplicate of this bug. ***
Comment 2 Niko Sams 2012-01-14 08:01:03 UTC
This is a serious bug that can cause loss of data (thankfully kates crash recovery avoids that - but not for new, unsaved files)

To reproduce:
- Open a file in Code Area
- Switch to Debug Area
- Open the same workingset as in Code Area (by clicking the workingset icon in the code tab)
- Switch back to Code Area
- modify file (without saving change)
- close file

Actual Result:
File is closed without asking to save changes.
(as both areas share the same workingset it's also closed in debug area)

Expected Result:
Ask the user if he want's to save changes.


If you create a new file instead of opening kate crash recovery won't work and this will result into data loss!
Comment 3 David Nolden 2012-02-15 12:03:50 UTC
Git commit ffd8720c8d701c77152d5e09ce9a8bb6f0f99e91 by David nolden.
Committed on 14/02/2012 at 22:47.
Pushed by zwabel into branch '1.3'.

Fix a regression in closeView which could cause modified documents to silently disappear without asking the user.

M  +4    -1    sublime/area.cpp

http://commits.kde.org/kdevplatform/ffd8720c8d701c77152d5e09ce9a8bb6f0f99e91