mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix #15627: missing plugin icons in Plugin Manager
This commit is contained in:
parent
fe933d2de3
commit
248bc5db03
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user