Skip to content
Permalink
Browse files

Remove trusted status from Plugin Manager

  • Loading branch information
DelazJ authored and m-kuhn committed Sep 29, 2017
1 parent c48e006 commit 4b0607a71fb9f981bf50a415dc12ab09f65a01ec
@@ -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 );
@@ -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() )
{
@@ -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%\">"
@@ -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


@@ -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)

0 comments on commit 4b0607a

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