Skip to content

Commit b123b53

Browse files
committed
[plugin manager] Guard from overly wide layout for read-only plugins
1 parent 51c2ba1 commit b123b53

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/app/pluginmanager/qgspluginmanager.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -899,11 +899,14 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item )
899899
}
900900

901901
#ifdef WITH_QTWEBKIT
902-
html += QLatin1String( "<div id='stars_bg'/><div id='stars'/>" );
903-
html += QLatin1String( "<div id='votes'>" );
904-
html += votes;
905-
html += QLatin1String( "</div>" );
906-
html += QLatin1String( "<div><a id='send_vote_trigger'/></div>" );
902+
if ( metadata->value( QStringLiteral( "readonly" ) ) == QLatin1String( "false" ) )
903+
{
904+
html += QLatin1String( "<div id='stars_bg'/><div id='stars'/>" );
905+
html += QLatin1String( "<div id='votes'>" );
906+
html += votes;
907+
html += QLatin1String( "</div>" );
908+
html += QLatin1String( "<div><a id='send_vote_trigger'/></div>" );
909+
}
907910
#else
908911
voteRating->setText( votes );
909912
#endif
@@ -992,7 +995,7 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item )
992995
html += QStringLiteral( "<tr><td class='key'>%1 </td><td>%2</td></tr>" ).arg( tr( "Changelog" ), changelog );
993996
}
994997

995-
html += QLatin1String( "</td></tr></table>" );
998+
html += QLatin1String( "</table>" );
996999

9971000
html += QLatin1String( "</body>" );
9981001

0 commit comments

Comments
 (0)