keep pointer of track listener
ClosedPublic

Authored by astippich on Aug 25 2018, 11:51 AM.

Details

Summary

the metadata scanning for the file browser is currently done in the gui
thread. in preparation for moving this to the musiclistenersmanager, keep a
pointer to the trackslistener so that it can be reused

Test Plan

tests pass, music is still scanned correctly

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich requested review of this revision.Aug 25 2018, 11:51 AM
astippich created this revision.
mgallien requested changes to this revision.Sep 26 2018, 7:37 PM

What is your rationale for this change ? I do not agree that we should change things when not needed by some other code changes. Even if there exists some automatic tests, the coverage is not good enough to guarantee that we will not have regressions.

Please see my comments.

src/musiclistenersmanager.cpp
123–124

You should delay the creation until somebody call subscribeForTracks. It is not needed before and will delay the creation of MusicListenersManager.

202–209

Keep them in subscribeForTracks. They are not needed when nobody is connected to d->mTracksListener .

This revision now requires changes to proceed.Sep 26 2018, 7:37 PM
astippich updated this revision to Diff 43041.Oct 7 2018, 2:19 PM
  • create trackslistener on demand

The rationale is given in the summary. The basic idea is to allow multiple clients.

mgallien added inline comments.Oct 7 2018, 3:06 PM
src/musiclistenersmanager.cpp
214–221

You do not to prepend this-> .

astippich updated this revision to Diff 43066.Oct 7 2018, 5:44 PM
  • remove explicit this->
mgallien accepted this revision.Oct 9 2018, 3:19 PM
This revision is now accepted and ready to land.Oct 9 2018, 3:19 PM
This revision was automatically updated to reflect the committed changes.