Fix Saved Playlists and Podcasts actions
After 2 failed attempts to solve this non-intrusively, I realized the obvious: the actions belong to the view, not the model! (Qt has no Model/View/Controller, it has Model/View+Controller) After this it was "easy", just a fair bit of work to move relevant actions to PlaylistBrowserModel and ensure they work correctly. Some playlist (and podcast) actions weren't really appropriate for PlaylistBrowserModel. Methods to get actions from these needed to be changed, because the old way simply didn't allow reliable action execution. When I was at it, I cleaned up a fair bit of things in podcasts (and playlist providers) - I haven't seen such code bloat in a while - 100-line-long unused function isn't anything surprising there. I'm pointing at you, Bart. :-) This regression exists since Ralf's cleanups, although Ralf certainly didn't introduce it - he just broke the delicate equilibrium of hacks that kept it working. (and I still think it was working just by chance) This doesn't go into ChangeLog as it was introduced post-2.7. The code is not perfect yet (we have lost "Create Empty Playlist" if you clink into empty space), but the bug this fixes is much more critical. BUG: 318782 FIXED-IN: 2.8 CCMAIL: amarok-devel@kde.org
Showing
- src/browsers/playlistbrowser/PlaylistBrowserModel.cpp 12 additions, 103 deletionssrc/browsers/playlistbrowser/PlaylistBrowserModel.cpp
- src/browsers/playlistbrowser/PlaylistBrowserModel.h 6 additions, 14 deletionssrc/browsers/playlistbrowser/PlaylistBrowserModel.h
- src/browsers/playlistbrowser/PlaylistBrowserView.cpp 351 additions, 69 deletionssrc/browsers/playlistbrowser/PlaylistBrowserView.cpp
- src/browsers/playlistbrowser/PlaylistBrowserView.h 36 additions, 21 deletionssrc/browsers/playlistbrowser/PlaylistBrowserView.h
- src/browsers/playlistbrowser/PodcastModel.cpp 13 additions, 68 deletionssrc/browsers/playlistbrowser/PodcastModel.cpp
- src/browsers/playlistbrowser/PodcastModel.h 2 additions, 9 deletionssrc/browsers/playlistbrowser/PodcastModel.h
- src/core-impl/collections/ipodcollection/IpodPlaylistProvider.cpp 13 additions, 30 deletions...-impl/collections/ipodcollection/IpodPlaylistProvider.cpp
- src/core-impl/collections/ipodcollection/IpodPlaylistProvider.h 4 additions, 5 deletions...re-impl/collections/ipodcollection/IpodPlaylistProvider.h
- src/core-impl/collections/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.cpp 2 additions, 62 deletions...cecollection/playlist/MediaDeviceUserPlaylistProvider.cpp
- src/core-impl/collections/mediadevicecollection/playlist/MediaDeviceUserPlaylistProvider.h 3 additions, 18 deletions...vicecollection/playlist/MediaDeviceUserPlaylistProvider.h
- src/core-impl/collections/umscollection/podcasts/UmsPodcastProvider.cpp 48 additions, 46 deletions...collections/umscollection/podcasts/UmsPodcastProvider.cpp
- src/core-impl/collections/umscollection/podcasts/UmsPodcastProvider.h 4 additions, 6 deletions...l/collections/umscollection/podcasts/UmsPodcastProvider.h
- src/core-impl/playlists/providers/user/UserPlaylistProvider.cpp 1 addition, 218 deletions...re-impl/playlists/providers/user/UserPlaylistProvider.cpp
- src/core-impl/playlists/providers/user/UserPlaylistProvider.h 17 additions, 64 deletions...core-impl/playlists/providers/user/UserPlaylistProvider.h
- src/core-impl/playlists/types/file/PlaylistFile.h 1 addition, 1 deletionsrc/core-impl/playlists/types/file/PlaylistFile.h
- src/core-impl/podcasts/sql/SqlPodcastProvider.cpp 83 additions, 283 deletionssrc/core-impl/podcasts/sql/SqlPodcastProvider.cpp
- src/core-impl/podcasts/sql/SqlPodcastProvider.h 3 additions, 6 deletionssrc/core-impl/podcasts/sql/SqlPodcastProvider.h
- src/core/playlists/Playlist.cpp 0 additions, 17 deletionssrc/core/playlists/Playlist.cpp
- src/core/playlists/Playlist.h 0 additions, 12 deletionssrc/core/playlists/Playlist.h
- src/core/playlists/PlaylistProvider.cpp 43 additions, 4 deletionssrc/core/playlists/PlaylistProvider.cpp
Loading
Please register or sign in to comment