mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-07 15:48:51 +01:00
Change StandardItemIconLoader to require a QStandardItemModel
This should be a safe assumption since the loader operates on QStandardItem objects.
This commit is contained in:
parent
cb64d97050
commit
dc4270076d
@ -18,7 +18,7 @@
|
||||
#include "standarditemiconloader.h"
|
||||
#include "covers/albumcoverloader.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QSet>
|
||||
#include <QStandardItem>
|
||||
|
||||
@ -31,7 +31,7 @@ StandardItemIconLoader::StandardItemIconLoader(AlbumCoverLoader* cover_loader,
|
||||
SLOT(ImageLoaded(quint64, QImage)));
|
||||
}
|
||||
|
||||
void StandardItemIconLoader::SetModel(QAbstractItemModel* model) {
|
||||
void StandardItemIconLoader::SetModel(QStandardItemModel* model) {
|
||||
if (model_) {
|
||||
disconnect(model_, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(RowsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
|
@ -26,7 +26,7 @@
|
||||
class AlbumCoverLoader;
|
||||
class Song;
|
||||
|
||||
class QAbstractItemModel;
|
||||
class QStandardItemModel;
|
||||
class QModelIndex;
|
||||
class QStandardItem;
|
||||
|
||||
@ -40,7 +40,7 @@ class StandardItemIconLoader : public QObject {
|
||||
|
||||
AlbumCoverLoaderOptions* options() { return &cover_options_; }
|
||||
|
||||
void SetModel(QAbstractItemModel* model);
|
||||
void SetModel(QStandardItemModel* model);
|
||||
|
||||
void LoadIcon(const QString& art_automatic, const QString& art_manual,
|
||||
QStandardItem* for_item);
|
||||
@ -55,7 +55,7 @@ class StandardItemIconLoader : public QObject {
|
||||
AlbumCoverLoader* cover_loader_;
|
||||
AlbumCoverLoaderOptions cover_options_;
|
||||
|
||||
QAbstractItemModel* model_;
|
||||
QStandardItemModel* model_;
|
||||
|
||||
QMap<quint64, QStandardItem*> pending_covers_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user