Skip to content
Permalink
Browse files

Fix #15627: missing plugin icons in Plugin Manager

  • Loading branch information
borysiasty committed Nov 23, 2017
1 parent fe933d2 commit 248bc5db032cf4a5f7b1b762dd265181105004e2
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/app/pluginmanager/qgspluginmanager.cpp
@@ -812,16 +812,20 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item )
html += QLatin1String( "<table cellspacing=\"4\" width=\"100%\"><tr><td>" );

QString iconPath = metadata->value( QStringLiteral( "icon" ) );
if ( QFileInfo( iconPath ).isFile() )

if ( QFileInfo( iconPath ).isFile() || iconPath.startsWith( QLatin1String( "http" ) ) )
{
if ( iconPath.contains( QLatin1String( ":/" ) ) )
if ( iconPath.startsWith( QLatin1String( ":/" ) ) )
{
iconPath = "qrc" + iconPath;
}
else
#if !defined(Q_OS_WIN)
// Only add the file:// prefix on non-windows systems
else if ( ! iconPath.startsWith( QLatin1String( "http" ) ) )
{
iconPath = "file://" + iconPath;
}
#endif
html += QStringLiteral( "<img src=\"%1\" style=\"float:right;max-width:64px;max-height:64px;\">" ).arg( iconPath );
}

0 comments on commit 248bc5d

Please sign in to comment.
You can’t perform that action at this time.