Skip to content

Commit

Permalink
Fix #15627: missing plugin icons in Plugin Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Nov 23, 2017
1 parent fe933d2 commit 248bc5d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -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 );
}

Expand Down

0 comments on commit 248bc5d

Please sign in to comment.