Improve management of empty/invalid files
ClosedPublic

Authored by sdepiets on Aug 28 2018, 2:51 AM.

Details

Summary

Previously lokalize SIGABRT when it encountered an invalid file within the project folder (for instance empty file).
Now the file will be shown with a red flag in the project view.
Empty files (no strings to translate) will also be shown with a yellow flag (the ability to filter out all empty files should make this manageable).

Diff Detail

Repository
R456 Lokalize
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sdepiets requested review of this revision.Aug 28 2018, 2:51 AM
sdepiets created this revision.
sdepiets edited the summary of this revision. (Show Details)Aug 28 2018, 2:57 AM
sdepiets added a project: Localization.
aacid added inline comments.Aug 28 2018, 8:50 PM
src/project/projectmodel.cpp
630–634

const here and below?

1330

I've no idea what this operator is for, but if it's used to store to disk, do we need versioning here? So we can read old and new versions?

sdepiets updated this revision to Diff 40590.Aug 29 2018, 1:35 AM
sdepiets marked an inline comment as done.

Versioning of binary data + const

sdepiets marked an inline comment as done.Aug 29 2018, 1:36 AM
sdepiets added inline comments.
src/project/projectmodel.cpp
630–634

Added

1330

Good idea, added a magic number and a version number

sdepiets updated this revision to Diff 40591.Aug 29 2018, 1:40 AM
sdepiets marked an inline comment as done.

Fix legacy data reader

sdepiets updated this revision to Diff 40592.Aug 29 2018, 1:50 AM

Fix a discrepency between used timestamps

This revision was not accepted when it landed; it landed in state Needs Review.Aug 29 2018, 1:52 AM
This revision was automatically updated to reflect the committed changes.