From 68de791e8c983d5920425ff4497fa329557b0895 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 5 Jul 2012 13:57:27 +0200 Subject: [PATCH] yay! we have album covers! --- .../playlist/dynamic/widgets/DynamicQmlWidget.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp b/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp index fad4d67ee..4d3b1f87a 100644 --- a/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp +++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp @@ -93,18 +93,14 @@ QPixmap DynamicQmlWidget::requestPixmap(const QString &id, QSize *size, const QS if( size ) *size = QSize( width, height ); - QModelIndex index = m_model->index( id.toInt(), 0, QModelIndex() ); + QModelIndex index = m_proxyModel->mapToSource( m_proxyModel->index( id.toInt(), 0, QModelIndex() ) ); qDebug() << "!*!*!*! got index" << index << id; if( index.isValid() ) { PlayableItem *item = m_model->itemFromIndex( index ); qDebug() << "item:" << item; qDebug() << "item2:" << item->artistName() << item->name(); - if ( !item->album().isNull() ) { - return item->album()->cover( *size ); - } else if ( !item->artist().isNull() ) { - return item->artist()->cover( *size ); - } else if ( !item->query().isNull() ) { - return item->query()->cover( *size ); + if ( !item->query().isNull() ) { + return item->query()->displayQuery()->cover( *size ); } }