Skip to content

Commit

Permalink
Remove trusted status from Plugin Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and m-kuhn committed Oct 30, 2017
1 parent c48e006 commit 4b0607a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
5 changes: 0 additions & 5 deletions src/app/pluginmanager/qgspluginitemdelegate.cpp
Expand Up @@ -82,11 +82,6 @@ void QgsPluginItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem
painter->setPen( option.palette.text().color() );
}

if ( index.data( PLUGIN_TRUSTED_ROLE ).toBool() )
{
painter->setPen( Qt::darkGreen );
}

if ( ! index.data( PLUGIN_ERROR_ROLE ).toString().isEmpty() )
{
painter->setPen( Qt::red );
Expand Down
10 changes: 0 additions & 10 deletions src/app/pluginmanager/qgspluginmanager.cpp
Expand Up @@ -537,7 +537,6 @@ void QgsPluginManager::reloadModelData()
mypDetailItem->setData( it->value( QStringLiteral( "downloads" ) ).rightJustified( 10, '0' ), PLUGIN_DOWNLOADS_ROLE );
mypDetailItem->setData( it->value( QStringLiteral( "zip_repository" ) ), PLUGIN_REPOSITORY_ROLE );
mypDetailItem->setData( it->value( QStringLiteral( "average_vote" ) ), PLUGIN_VOTE_ROLE );
mypDetailItem->setData( it->value( QStringLiteral( "trusted" ) ), PLUGIN_TRUSTED_ROLE );

if ( QFileInfo( iconPath ).isFile() )
{
Expand Down Expand Up @@ -801,15 +800,6 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item )
"</table>" ).arg( tr( "This plugin is deprecated" ) );
}

if ( metadata->value( QStringLiteral( "trusted" ) ) == QLatin1String( "true" ) )
{
html += QString( "<table bgcolor=\"#90EE90\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
" <tr><td width=\"100%\" style=\"color:#660000\">"
" <img src=\"qrc:/images/themes/default/mIconSuccess.svg\" width=\"32\"><b>%1</b>"
" </td></tr>"
"</table>" ).arg( tr( "This plugin is trusted" ) );
}

if ( metadata->value( QStringLiteral( "readonly" ) ) == QLatin1String( "true" ) )
{
html += QString( "<table bgcolor=\"#90EEE9\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
Expand Down
5 changes: 2 additions & 3 deletions src/app/pluginmanager/qgspluginsortfilterproxymodel.h
Expand Up @@ -30,7 +30,6 @@ const int PLUGIN_STATUS_ROLE = Qt::UserRole + 6; // for filtering and sort
const int PLUGIN_DOWNLOADS_ROLE = Qt::UserRole + 7; // for sorting
const int PLUGIN_VOTE_ROLE = Qt::UserRole + 8; // for sorting
const int PLUGIN_REPOSITORY_ROLE = Qt::UserRole + 9; // for sorting
const int PLUGIN_TRUSTED_ROLE = Qt::UserRole + 10; // for highlighting
const int SPACER_ROLE = Qt::UserRole + 20; // for sorting


Expand All @@ -45,10 +44,10 @@ class QgsPluginSortFilterProxyModel : public QSortFilterProxyModel
public:
explicit QgsPluginSortFilterProxyModel( QObject *parent = nullptr );

//! (Re)configire the status filter
//! (Re)configure the status filter
void setAcceptedStatuses( const QStringList &statuses );

//! (Re)configire the spacer filter
//! (Re)configure the spacer filter
void setAcceptedSpacers( const QString &spacers = QString() );

//! Return number of item with status filter matching (no other filters are considered)
Expand Down

0 comments on commit 4b0607a

Please sign in to comment.