diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-11-13 11:13:43 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-11-13 11:14:43 +0100 |
commit | 59371b6d713cb58974642cbbcf33a89bb050afba (patch) | |
tree | 4c570c50462d72e9979bcec5f531c5122093f41b /src/library/dao/trackdao.cpp | |
parent | 582b43fd1df7a3488c6e830074eba0e3a1a14c53 (diff) | |
parent | f47944b223fa5698d3f84cb6dd83bdd60e43bd12 (diff) |
Merge branch 'main' into library_last_played_at
Diffstat (limited to 'src/library/dao/trackdao.cpp')
-rw-r--r-- | src/library/dao/trackdao.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp index b6476ff3bf..1e14b813ce 100644 --- a/src/library/dao/trackdao.cpp +++ b/src/library/dao/trackdao.cpp @@ -37,6 +37,7 @@ #include "util/file.h" #include "util/logger.h" #include "util/math.h" +#include "util/qt.h" #include "util/timer.h" namespace { @@ -303,7 +304,7 @@ void TrackDAO::saveTrack(Track* pTrack) const { // not receive any signals that are usually forwarded to // BaseTrackCache. DEBUG_ASSERT(!pTrack->isDirty()); - emit trackClean(trackId); + emit mixxx::thisAsNonConst(this)->trackClean(trackId); } } @@ -1485,7 +1486,7 @@ TrackPointer TrackDAO::getTrackById(TrackId trackId) const { this, [this](TrackId trackId) { // Adapt and forward signal - emit tracksChanged(QSet<TrackId>{trackId}); + emit mixxx::thisAsNonConst(this)->tracksChanged(QSet<TrackId>{trackId}); }); // BaseTrackCache cares about track trackDirty/trackClean notifications @@ -1493,9 +1494,9 @@ TrackPointer TrackDAO::getTrackById(TrackId trackId) const { // track modifications above have been sent before the TrackDAO has been // connected to the track's signals and need to be replayed manually. if (pTrack->isDirty()) { - emit trackDirty(trackId); + emit mixxx::thisAsNonConst(this)->trackDirty(trackId); } else { - emit trackClean(trackId); + emit mixxx::thisAsNonConst(this)->trackClean(trackId); } return pTrack; @@ -2207,6 +2208,6 @@ bool TrackDAO::updatePlayCounterFromPlayedHistory( // TODO: DAOs should be passive and simply execute queries. They // should neither make assumptions about transaction boundaries // nor receive or emit any signals. - emit tracksChanged(trackIds); + emit mixxx::thisAsNonConst(this)->tracksChanged(trackIds); return true; } |