Add choice of date formats
ClosedPublic

Authored by michaelh on Mar 11 2018, 6:22 PM.

Details

Summary
  • Add DateFormat enum
  • Move value formatting to widgetfactory
Test Plan

make test

Diff Detail

Repository
R824 Baloo Widgets
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
michaelh created this revision.Mar 11 2018, 6:22 PM
Restricted Application added a project: Baloo. · View Herald TranscriptMar 11 2018, 6:22 PM
michaelh requested review of this revision.Mar 11 2018, 6:22 PM
michaelh updated this revision to Diff 29631.Mar 15 2018, 8:33 PM

Remove unrelated changes

ngraham added a subscriber: ngraham.Apr 5 2018, 9:20 PM

Could you re-base this on current master, please?

src/widgetfactory.cpp
148

No need for whitespace

michaelh updated this revision to Diff 31431.Apr 5 2018, 9:32 PM
michaelh edited the summary of this revision. (Show Details)
  • Remove obsolete comments

In testing this out along with the UI to enable it, I found that it only affected the date shown under "Creation Date" in my PDFs, and not the date shown under "Modified".

michaelh updated this revision to Diff 31506.Apr 6 2018, 4:10 PM
  • filemetadatadatedisplaytest: Use en_US locale

In testing this out along with the UI to enable it, I found that it only affected the date shown under "Creation Date" in my PDFs, and not the date shown under "Modified".

That is a little puzzling as it works here for both dates on any file I've checked e.g. test.pdf from kfilemetadata. Could you share your pdf?

Is it normal behaviour that arc diff has to be forced with --update Dxxxxx after a rebase?

What is puzzling me even more: The locale seems to change with the file. ???



bruns added a subscriber: bruns.Apr 6 2018, 5:04 PM

What is puzzling me even more: The locale seems to change with the file. ???

Only pattern I could see - the english ones are CEST, the localized ones are CET or UTC.

src/widgetfactory.cpp
141

make m_dateFormat QLocale::FormatType and move the conversion to the getter/setter.

michaelh updated this revision to Diff 31508.Apr 6 2018, 5:39 PM
  • Internally use QLocale:FormatType
michaelh marked 2 inline comments as done.Apr 6 2018, 5:40 PM
michaelh added a comment.EditedApr 7 2018, 7:29 AM

After the last build filemetadataitemcounttest failed for no obvious reason (40 elements versus 38 expected). Also since then 'Genre' tag is showing up with an empty value for some audio sample files in Info Panel.
It would be helpful if somebody could confirm this. It might be that something is wrong upstream.
EDIT: Fixed in D12029

LGTM.
@ngraham can you accept if it is fine for you?

ngraham accepted this revision.Apr 10 2018, 5:09 AM

Huh, can't reproduce my issue; everything works perfectly with this patchset. Code looks sane too.

This revision is now accepted and ready to land.Apr 10 2018, 5:09 AM
This revision was automatically updated to reflect the committed changes.