[vlc-commits] Qt: Extensions: fix showing cone when no custom logo
Francois Cartegnie
git at videolan.org
Sun Jun 23 15:42:25 CEST 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jun 23 15:41:39 2013 +0200| [5f1ea6d304c4b42219db02814011010d8a6ec777] | committer: Francois Cartegnie
Qt: Extensions: fix showing cone when no custom logo
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f1ea6d304c4b42219db02814011010d8a6ec777
---
modules/gui/qt4/dialogs/plugins.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/dialogs/plugins.cpp b/modules/gui/qt4/dialogs/plugins.cpp
index a606d2a..b549db4 100644
--- a/modules/gui/qt4/dialogs/plugins.cpp
+++ b/modules/gui/qt4/dialogs/plugins.cpp
@@ -317,6 +317,7 @@ QVariant ExtensionListModel::ExtensionCopy::data( int role ) const
case Qt::DisplayRole:
return title;
case Qt::DecorationRole:
+ if ( !icon ) return QPixmap( ":/logo/vlc48.png" );
return *icon;
case DescriptionRole:
return shortdesc;
@@ -531,11 +532,8 @@ ExtensionInfoDialog::ExtensionInfoDialog( const QModelIndex &index,
// Icon
QLabel *icon = new QLabel( this );
QPixmap pix = index.data(Qt::DecorationRole).value<QPixmap>();
- if( pix.isNull() )
- {
- pix = QPixmap( ":/logo/vlc48.png" );
- icon->setPixmap( pix );
- }
+ Q_ASSERT( !pix.isNull() );
+ icon->setPixmap( pix );
icon->setAlignment( Qt::AlignCenter );
icon->setFixedSize( 48, 48 );
layout->addWidget( icon, 1, 0, 2, 1 );
More information about the vlc-commits
mailing list