FileMetaDataWidget: Avoid showing fields when they have no value
ClosedPublic

Authored by meven on Apr 19 2020, 6:42 AM.

Details

Summary

When displaying remote:/ recentlyused:/, Search:/ or and Tags:/, the information panel shows modifications time, access time and size with empty field value.
This patches avoids displaying those fields when we have no value for them.

CCBUG: 413091
More precisely https://bugs.kde.org/show_bug.cgi?id=413091#c7

Test Plan

Open remote:/ in Dolphin:
Size, Access and modification dates fields are not visible

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.
meven created this revision.Apr 19 2020, 6:42 AM
Restricted Application added a project: Baloo. · View Herald TranscriptApr 19 2020, 6:42 AM
Restricted Application added a subscriber: Baloo. · View Herald Transcript
meven requested review of this revision.Apr 19 2020, 6:42 AM
ngraham accepted this revision.Apr 19 2020, 11:19 PM
ngraham added a reviewer: bruns.
This revision is now accepted and ready to land.Apr 19 2020, 11:19 PM
meven added a comment.Apr 25 2020, 7:52 PM

@bruns does this sounds good to you ?

bruns added a comment.Apr 25 2020, 8:04 PM

@bruns does this sounds good to you ?

The code looks fine. Can you extend the summary so it is immediately visible where this is needed/useful, without having to folllow the bug link?

meven added a comment.Apr 25 2020, 8:09 PM

@bruns does this sounds good to you ?

The code looks fine. Can you extend the summary so it is immediately visible where this is needed/useful, without having to folllow the bug link?

The test plan showed succinctly what the diff accomplished I think.
I will improve the comment still.

meven edited the summary of this revision. (Show Details)Apr 25 2020, 8:10 PM
bruns added a comment.Apr 25 2020, 8:11 PM

Wrap at ~80 characters, please.

bruns accepted this revision.Apr 25 2020, 8:11 PM
meven retitled this revision from FileMetaDataWidget: Avoid displaying size and dates fields when they have no value to FileMetaDataWidget: Avoid fields when they have no value.Apr 25 2020, 8:11 PM
meven retitled this revision from FileMetaDataWidget: Avoid fields when they have no value to FileMetaDataWidget: Avoid showing fields when they have no value.
meven edited the summary of this revision. (Show Details)Apr 25 2020, 8:13 PM
This revision was automatically updated to reflect the committed changes.