diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2023-06-15 01:08:01 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2023-06-15 01:15:21 +0200 |
commit | 2029d36a9ea9a4efd390101e873fb30c0a36caf1 (patch) | |
tree | 55bf455dd16f8a7fa22aa9d409f06c2ff01896ea | |
parent | 324bf99f43e18dcb052551cbc743a9cfae079594 (diff) |
Add missing override createPlaylistModelForPlaylist() in RythmboxFeature
-rw-r--r-- | src/library/rhythmbox/rhythmboxfeature.cpp | 15 | ||||
-rw-r--r-- | src/library/rhythmbox/rhythmboxfeature.h | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/library/rhythmbox/rhythmboxfeature.cpp b/src/library/rhythmbox/rhythmboxfeature.cpp index 159c7d5ff9..889203c751 100644 --- a/src/library/rhythmbox/rhythmboxfeature.cpp +++ b/src/library/rhythmbox/rhythmboxfeature.cpp @@ -91,13 +91,14 @@ RhythmboxFeature::~RhythmboxFeature() { delete m_pRhythmboxPlaylistModel; } -BaseSqlTableModel* RhythmboxFeature::getPlaylistModelForPlaylist(const QString& playlist) { - BaseExternalPlaylistModel* pModel = new BaseExternalPlaylistModel( - this, m_pLibrary->trackCollections(), - "mixxx.db.model.rhythmbox_playlist", - "rhythmbox_playlists", - "rhythmbox_playlist_tracks", - m_trackSource); +std::unique_ptr<BaseSqlTableModel> +RhythmboxFeature::createPlaylistModelForPlaylist(const QString& playlist) { + auto pModel = std::make_unique<BaseExternalPlaylistModel>(this, + m_pLibrary->trackCollections(), + "mixxx.db.model.rhythmbox_playlist", + "rhythmbox_playlists", + "rhythmbox_playlist_tracks", + m_trackSource); pModel->setPlaylist(playlist); return pModel; } diff --git a/src/library/rhythmbox/rhythmboxfeature.h b/src/library/rhythmbox/rhythmboxfeature.h index fd2ef67f76..8b2cdd8cdc 100644 --- a/src/library/rhythmbox/rhythmboxfeature.h +++ b/src/library/rhythmbox/rhythmboxfeature.h @@ -35,8 +35,11 @@ class RhythmboxFeature : public BaseExternalLibraryFeature { void activateChild(const QModelIndex& index); void onTrackCollectionLoaded(); + protected: + std::unique_ptr<BaseSqlTableModel> createPlaylistModelForPlaylist( + const QString& playlist) override; + private: - virtual BaseSqlTableModel* getPlaylistModelForPlaylist(const QString& playlist); // Removes all rows from a given table void clearTable(const QString& table_name); // reads the properties of a track and executes a SQL statement |