Change the way a playlist is bound to a media object.

The previous behavior was to simply switch from the internal
control to the service's control, discarding anything that was
added to the playlist before binding.
We now carry over the changes made to the playlist when switching
controls. This means the switch is now transparent to the user.
When the service's control is read-only, we cannot transfer the
items, which means the user must be notified of the items that
might have been "lost" during the switch.

Auto-test modified to reflect this change.

Change-Id: Ibf80b650b06425ddbaeb320b72ac5d3082a25960
Reviewed-by: Jim Hodapp <jim.hodapp@canonical.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Yoann Lopes
2015-10-08 18:26:39 +02:00
committed by Simon Hausmann
parent 94c33684fe
commit 82e135167a
6 changed files with 388 additions and 35 deletions

View File

@@ -44,7 +44,7 @@ class MockPlaylistService : public QMediaService
public:
MockPlaylistService():QMediaService(0)
{
mockControl = new MockMediaPlaylistControl(this);
mockControl = new MockMediaPlaylistControl(false, this);
}
~MockPlaylistService()