pipe loading of album data through proxy model
ClosedPublic

Authored by astippich on Feb 18 2018, 6:40 PM.

Details

Summary

pipe loading of album data through proxy model so that qml does not have to know about the album model, similar to all other proxy models

Test Plan

album data is loaded correctly from all albums view and single artist view

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.Feb 18 2018, 6:40 PM
astippich created this revision.
astippich updated this revision to Diff 27489.Feb 18 2018, 7:08 PM
  • remove unused qml function
mgallien requested changes to this revision.Feb 28 2018, 9:58 PM
mgallien added a subscriber: mgallien.

Just a small change and this should be good. Sorry for the delay.

src/models/singlealbumproxymodel.cpp
101

You should use a qobject_cast. This makes the cast works or fails but only when the sourceModel is not an AlbumModel object. You should also handle this failure case. Just in case we reuse this code in another context.

This revision now requires changes to proceed.Feb 28 2018, 9:58 PM
astippich updated this revision to Diff 28348.Mar 1 2018, 6:14 PM
  • use qobject_cast
  • Merge branch 'master' into album_proxy
mgallien accepted this revision.Mar 8 2018, 8:06 PM

Thanks

This revision is now accepted and ready to land.Mar 8 2018, 8:06 PM
This revision was automatically updated to reflect the committed changes.