Commit 5f1ea6d3 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: Extensions: fix showing cone when no custom logo

parent dd29c917
...@@ -317,6 +317,7 @@ QVariant ExtensionListModel::ExtensionCopy::data( int role ) const ...@@ -317,6 +317,7 @@ QVariant ExtensionListModel::ExtensionCopy::data( int role ) const
case Qt::DisplayRole: case Qt::DisplayRole:
return title; return title;
case Qt::DecorationRole: case Qt::DecorationRole:
if ( !icon ) return QPixmap( ":/logo/vlc48.png" );
return *icon; return *icon;
case DescriptionRole: case DescriptionRole:
return shortdesc; return shortdesc;
...@@ -531,11 +532,8 @@ ExtensionInfoDialog::ExtensionInfoDialog( const QModelIndex &index, ...@@ -531,11 +532,8 @@ ExtensionInfoDialog::ExtensionInfoDialog( const QModelIndex &index,
// Icon // Icon
QLabel *icon = new QLabel( this ); QLabel *icon = new QLabel( this );
QPixmap pix = index.data(Qt::DecorationRole).value<QPixmap>(); QPixmap pix = index.data(Qt::DecorationRole).value<QPixmap>();
if( pix.isNull() ) Q_ASSERT( !pix.isNull() );
{
pix = QPixmap( ":/logo/vlc48.png" );
icon->setPixmap( pix ); icon->setPixmap( pix );
}
icon->setAlignment( Qt::AlignCenter ); icon->setAlignment( Qt::AlignCenter );
icon->setFixedSize( 48, 48 ); icon->setFixedSize( 48, 48 );
layout->addWidget( icon, 1, 0, 2, 1 ); layout->addWidget( icon, 1, 0, 2, 1 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment