Skip to content

Commit

Permalink
Add missing override createPlaylistModelForPlaylist() in RythmboxFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jun 14, 2023
1 parent 324bf99 commit 2029d36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/library/rhythmbox/rhythmboxfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion src/library/rhythmbox/rhythmboxfeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2029d36

Please sign in to comment.