[InformationPanel] Hide the video when the preview is disabled, avoid computing the preview when it is disabled
ClosedPublic

Authored by meven on Mar 17 2019, 8:20 PM.

Details

Summary

Bug symptom :

Fix the bugs and allow to avoid launching a PreviewJob with all files even when the preview is disabled.

Test Plan
  1. In dolphin with an information panel with preview on
  2. launch the video preview
  3. Disable the preview

    ->bug 1: the video player control is still visible (this bug fix this)
  4. re-enable preview

    -> bug 2: the video stays visible and the preview is displayed above (this bug fix this)

Diff Detail

Repository
R318 Dolphin
Branch
arcpatch-D19844_2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10029
Build 10047: arc lint + arc unit
meven created this revision.Mar 17 2019, 8:20 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptMar 17 2019, 8:20 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
meven requested review of this revision.Mar 17 2019, 8:20 PM
meven edited the summary of this revision. (Show Details)Mar 17 2019, 8:33 PM
meven edited the test plan for this revision. (Show Details)
ngraham accepted this revision as: ngraham.Mar 18 2019, 3:10 PM
ngraham added a subscriber: ngraham.

Please wait for @elvisangelaccio's review now. :)

This revision is now accepted and ready to land.Mar 18 2019, 3:10 PM
meven updated this revision to Diff 54236.Mar 18 2019, 3:39 PM
meven edited the test plan for this revision. (Show Details)

Rebase on master

meven retitled this revision from Hide the video when the preview is disabled, avoid computing the preview when it is disabled to [InformationPanel] Hide the video when the preview is disabled, avoid computing the preview when it is disabled.Mar 18 2019, 3:45 PM

Sorry to be pedantic, but we are fixing two different bugs, right? Would it be possible to split this patch into two commits?

meven edited the test plan for this revision. (Show Details)Mar 18 2019, 9:26 PM
meven added a comment.Mar 18 2019, 9:46 PM

Sorry to be pedantic, but we are fixing two different bugs, right? Would it be possible to split this patch into two commits?

The two weird behavior are the same bug.
They sum up the same way : the video widget visibility is not synched to the state of the setting InformationPanelSettings::previewsShown.

meven updated this revision to Diff 54402.Mar 20 2019, 10:37 AM
  • Avoid refreshing the preview when refreshing the metadata and vice-versa

I would need to get this merged for D19782.

@ngraham I have made a couple of changes to the patch since you reviewed.
Namely addin refreshPreview() and using refreshMetaData for a different purpose.
This was needed otherwise the patch introduced a bug.

elvisangelaccio requested changes to this revision.Mar 23 2019, 6:43 PM
elvisangelaccio added inline comments.
src/panels/information/informationpanel.cpp
212 ↗(On Diff #54402)

This looks like an unrelated cosmetic change that could go in another commit.

src/panels/information/informationpanelcontent.cpp
177–186 ↗(On Diff #54402)

Unrelated whitespace changes.

200 ↗(On Diff #54402)

Unrelated whitespace changes.

src/panels/information/informationpanelcontent.h
77 ↗(On Diff #54402)

Please add documentation for this method.

84–87 ↗(On Diff #54402)

Please update the documentation, as refreshMetaData() won't refresh the visibility of the metadata anymore after this patch.

This revision now requires changes to proceed.Mar 23 2019, 6:43 PM
meven updated this revision to Diff 54646.Mar 24 2019, 8:38 AM
  • Improve documentation
meven marked 3 inline comments as done.Mar 24 2019, 8:40 AM
meven added inline comments.
src/panels/information/informationpanelcontent.cpp
177–186 ↗(On Diff #54402)

It is related : this code is now in a if statement starting line 157.

200 ↗(On Diff #54402)

This is the correct spacing. Have a look at the side-by-side view.

meven marked 2 inline comments as done.Mar 24 2019, 8:41 AM
elvisangelaccio accepted this revision.Mar 24 2019, 9:43 AM

Please push to the 19.04 branch. Thanks!

src/panels/information/informationpanelcontent.cpp
177–186 ↗(On Diff #54402)

Ah you're right, the phabricator UI confused me :/

This revision is now accepted and ready to land.Mar 24 2019, 9:43 AM
ngraham accepted this revision.Mar 24 2019, 4:03 PM
This revision was automatically updated to reflect the committed changes.