Fix some compiler warnings
This commit is contained in:
@@ -431,7 +431,7 @@ QString NativeSeparatorsDelegate::displayText(const QVariant &value, const QLoca
|
||||
|
||||
}
|
||||
|
||||
SongSourceDelegate::SongSourceDelegate(QObject *parent, Player *player) : PlaylistDelegateBase(parent), player_(player) {}
|
||||
SongSourceDelegate::SongSourceDelegate(QObject *parent) : PlaylistDelegateBase(parent) {}
|
||||
|
||||
QString SongSourceDelegate::displayText(const QVariant &value, const QLocale&) const {
|
||||
return QString();
|
||||
|
||||
@@ -172,14 +172,13 @@ class NativeSeparatorsDelegate : public PlaylistDelegateBase {
|
||||
|
||||
class SongSourceDelegate : public PlaylistDelegateBase {
|
||||
public:
|
||||
SongSourceDelegate(QObject *parent, Player *player);
|
||||
SongSourceDelegate(QObject *parent);
|
||||
QString displayText(const QVariant &value, const QLocale &locale) const;
|
||||
void paint(QPainter *paint, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
private:
|
||||
QPixmap LookupPixmap(const Song::Source &type, const QSize &size) const;
|
||||
|
||||
Player *player_;
|
||||
mutable QPixmapCache cache_;
|
||||
};
|
||||
|
||||
|
||||
@@ -232,12 +232,7 @@ void PlaylistView::SetItemDelegates(CollectionBackend *backend) {
|
||||
setItemDelegateForColumn(Playlist::Column_Filename, new NativeSeparatorsDelegate(this));
|
||||
setItemDelegateForColumn(Playlist::Column_LastPlayed, new LastPlayedItemDelegate(this));
|
||||
|
||||
if (app_ && app_->player()) {
|
||||
setItemDelegateForColumn(Playlist::Column_Source, new SongSourceDelegate(this, app_->player()));
|
||||
}
|
||||
else {
|
||||
header_->HideSection(Playlist::Column_Source);
|
||||
}
|
||||
setItemDelegateForColumn(Playlist::Column_Source, new SongSourceDelegate(this));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user