Bug 412820 - recent files list not working
Summary: recent files list not working
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 19.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-10 15:48 UTC by Piotr Keplicz
Modified: 2019-12-29 15:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Keplicz 2019-10-10 15:48:16 UTC
SUMMARY

"Recent files" list doesn't work in Lokalize.

STEPS TO REPRODUCE
1. Open Lokalize, open a file to translate.
2. Close it.

OBSERVED RESULT

An bogus entry of "[]" appears in the "Recent files" list. Clicking it launches "Open file" dialog. After restart the list is empty.

EXPECTED RESULT

"Recent files" lists, well, recent files.
Comment 1 Simon Depiets 2019-12-29 08:48:09 UTC
It works quite well here.
What distribution are you using ?
Are you opening lokalize within a project ?
Comment 2 Simon Depiets 2019-12-29 14:51:59 UTC
(In reply to Simon Depiets from comment #1)
> It works quite well here.
> What distribution are you using ?
> Are you opening lokalize within a project ?

I confirm this happens when no project is opened (there are a lot of issues when no project is created, most of the code assumes there is one). I'll work on it.
Comment 3 Simon Depiets 2019-12-29 15:41:29 UTC
Git commit 331ce588003336c016bfe17b9af1e83586812e7e by Simon Depiets.
Committed on 29/12/2019 at 11:43.
Pushed by sdepiets into branch 'master'.

Fix a bug in recent files list with non-project file opens
There was a bug in recent files list when the files were not open from within a project but from File/Open.
I also added a check to prevent reopening the same file twice (via File/Open), to align behavior on project mode.
Tested with command line/project/file open

M  +6    -1    src/editortab.cpp
M  +3    -1    src/editortab.h
M  +3    -3    src/lokalizemainwindow.cpp

https://commits.kde.org/lokalize/331ce588003336c016bfe17b9af1e83586812e7e