Bug 351351

Summary: KF5 Akregator (4.81 beta1) saves autosaved/crashed files in wrong location
Product: [Applications] akregator Reporter: Alexander Kowalski <alexander.kowalski>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: GIT (master)   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.1
Sentry Crash Report:
Attachments: Patch to correct locations for "crashed" file as well

Description Alexander Kowalski 2015-08-16 08:04:55 UTC
In 4.81 beta1 (and current git master), akregator saves the autosaved/crashed files into the directory for the user's applications (~/.local/share/applications). In e.g. Part::autoSaveProperties() (akregator_part.cpp:841) it uses QStandardPaths::ApplicationsLocation as the path to save, but I'm really sure that that's not where config/state files should go, see http://doc.qt.io/qt-5/qstandardpaths.html.

The default value in KConfig is QStandardPaths::GenericConfigLocation, but if you want to change it to this maybe you should also think about whether it might not be better to also name the files differently so the user can see right away to which application they belong (I only knew because I remembered that files with those names used to be in akregator's directory in ~/.kde4/...) and to prevent name clashes.

Reproducible: Always

Steps to Reproduce:
1. Start (for crashed) and close (for autosaved) akregator.

Actual Results:  
Files are saved to applications directory.

Expected Results:  
Files are saved to appropriate place.
Comment 1 Alexander Kowalski 2015-08-16 08:15:19 UTC
I just looked through the available locations and it seems to me that QStandardPaths::AppDataLocation might be the right place for this.
Comment 2 Alexander Kowalski 2015-08-16 10:00:35 UTC
Created attachment 94051 [details]
Patch to correct locations for "crashed" file as well

I just saw that the issue with the "autosaved" file is already fixed in git, but not the one with the "crashed" file, so I made a patch to correct the path for that one as well. I also grepped through the akregator source directory to make sure I didn't miss any places where this appears, so I believe everything related to this bug should be fixed then.
Comment 3 Laurent Montel 2015-08-16 12:13:15 UTC
Git commit a64a384a9df1c9fb280d8c64eb7071740d55d295 by Montel Laurent.
Committed on 16/08/2015 at 12:12.
Pushed by mlaurent into branch 'master'.

Apply patch from Alexander Kowalski

M  +3    -3    akregator/src/akregator_part.cpp

http://commits.kde.org/kdepim/a64a384a9df1c9fb280d8c64eb7071740d55d295