Fix minor code issues

This commit is contained in:
Jonas Kvinge
2019-09-15 20:27:32 +02:00
parent 83e10aac27
commit 2d67279180
147 changed files with 644 additions and 329 deletions

View File

@@ -168,6 +168,8 @@ void SCollection::Stopped() {
void SCollection::CurrentSongChanged(const Song &song) { // FIXME
Q_UNUSED(song);
TagReaderReply *reply = nullptr;
if (reply) {
@@ -177,4 +179,5 @@ void SCollection::CurrentSongChanged(const Song &song) { // FIXME
}
void SCollection::SongsStatisticsChanged(const SongList &songs) {
Q_UNUSED(songs);
}

View File

@@ -1222,6 +1222,8 @@ void CollectionBackend::IncrementPlayCount(int id) {
void CollectionBackend::IncrementSkipCount(int id, float progress) {
Q_UNUSED(progress);
if (id == -1) return;
QMutexLocker l(db_->Mutex());

View File

@@ -587,6 +587,8 @@ QVariant CollectionModel::AlbumIcon(const QModelIndex &idx) {
void CollectionModel::AlbumCoverLoaded(const quint64 id, const QUrl &cover_url, const QImage &image) {
Q_UNUSED(cover_url);
if (!pending_art_.contains(id)) return;
ItemAndCacheKey item_and_cache_key = pending_art_.take(id);

View File

@@ -59,7 +59,8 @@ class CollectionItem;
class CollectionModel : public SimpleTreeModel<CollectionItem> {
Q_OBJECT
Q_ENUMS(GroupBy);
Q_ENUMS(GroupBy)
public:
CollectionModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
@@ -285,7 +286,7 @@ signals:
QSet<QString> pending_cache_keys_;
};
Q_DECLARE_METATYPE(CollectionModel::Grouping);
Q_DECLARE_METATYPE(CollectionModel::Grouping)
QDataStream &operator<<(QDataStream &s, const CollectionModel::Grouping &g);
QDataStream &operator>>(QDataStream &s, CollectionModel::Grouping &g);