From 4b0607a71fb9f981bf50a415dc12ab09f65a01ec Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Fri, 29 Sep 2017 23:11:52 +0200 Subject: [PATCH] Remove trusted status from Plugin Manager --- src/app/pluginmanager/qgspluginitemdelegate.cpp | 5 ----- src/app/pluginmanager/qgspluginmanager.cpp | 10 ---------- src/app/pluginmanager/qgspluginsortfilterproxymodel.h | 5 ++--- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/app/pluginmanager/qgspluginitemdelegate.cpp b/src/app/pluginmanager/qgspluginitemdelegate.cpp index f5a041d0b8bd..1e5942fed000 100644 --- a/src/app/pluginmanager/qgspluginitemdelegate.cpp +++ b/src/app/pluginmanager/qgspluginitemdelegate.cpp @@ -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 ); diff --git a/src/app/pluginmanager/qgspluginmanager.cpp b/src/app/pluginmanager/qgspluginmanager.cpp index a6fd6d19d1cf..0148b756549e 100644 --- a/src/app/pluginmanager/qgspluginmanager.cpp +++ b/src/app/pluginmanager/qgspluginmanager.cpp @@ -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 ) "" ).arg( tr( "This plugin is deprecated" ) ); } - if ( metadata->value( QStringLiteral( "trusted" ) ) == QLatin1String( "true" ) ) - { - html += QString( "" - " " - "
" - " %1" - "
" ).arg( tr( "This plugin is trusted" ) ); - } - if ( metadata->value( QStringLiteral( "readonly" ) ) == QLatin1String( "true" ) ) { html += QString( "" diff --git a/src/app/pluginmanager/qgspluginsortfilterproxymodel.h b/src/app/pluginmanager/qgspluginsortfilterproxymodel.h index f4f0fbd54121..f89b7f7c1b42 100644 --- a/src/app/pluginmanager/qgspluginsortfilterproxymodel.h +++ b/src/app/pluginmanager/qgspluginsortfilterproxymodel.h @@ -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)