From 3dc0c5670e43141afb76d4169b127a5621cda616 Mon Sep 17 00:00:00 2001 From: Borys Jurgiel Date: Fri, 14 Sep 2018 18:39:28 +0200 Subject: [PATCH] [Plugin manager][needs-docs] Better looking links to the installed and available version. Remove no longer used code. --- images/images.qrc | 1 - images/themes/default/externalLink.svg | 1 - src/app/pluginmanager/qgspluginmanager.cpp | 22 +++++-------------- .../qgspluginsortfilterproxymodel.h | 1 - 4 files changed, 6 insertions(+), 19 deletions(-) delete mode 100644 images/themes/default/externalLink.svg diff --git a/images/images.qrc b/images/images.qrc index 07466bf2871c..683dd2d03032 100755 --- a/images/images.qrc +++ b/images/images.qrc @@ -149,7 +149,6 @@ themes/default/copyright_label.svg themes/default/dbmanager.svg themes/default/extents.svg - themes/default/externalLink.svg themes/default/gpsicons/barchart.svg themes/default/gpsicons/polarchart.svg themes/default/grass_location.svg diff --git a/images/themes/default/externalLink.svg b/images/themes/default/externalLink.svg deleted file mode 100644 index 4f34b684d700..000000000000 --- a/images/themes/default/externalLink.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/pluginmanager/qgspluginmanager.cpp b/src/app/pluginmanager/qgspluginmanager.cpp index 4879c9617927..6d40e2a4ad7a 100644 --- a/src/app/pluginmanager/qgspluginmanager.cpp +++ b/src/app/pluginmanager/qgspluginmanager.cpp @@ -537,7 +537,6 @@ void QgsPluginManager::reloadModelData() mypDetailItem->setData( author, PLUGIN_AUTHOR_ROLE ); mypDetailItem->setData( it->value( QStringLiteral( "tags" ) ), PLUGIN_TAGS_ROLE ); 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 ); if ( QFileInfo( iconPath ).isFile() ) @@ -677,9 +676,6 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item ) " padding-right:10px;" " text-align:right;" " }" - " td.version img {" - " height:0.8em;" - " }" ""; if ( !metadata->value( QStringLiteral( "plugin_id" ) ).isEmpty() ) @@ -948,14 +944,11 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item ) { localDir = QFileInfo( localDir ).absolutePath(); } - - html += QStringLiteral( "%1 %4 " - "" + html += QStringLiteral( "%1 %4" ).arg( tr( "Installed version" ), - tr( "in" ), metadata->value( QStringLiteral( "library" ) ), - ver, - QUrl::fromLocalFile( localDir ).toString() ); + QUrl::fromLocalFile( localDir ).toString(), + ver ); } if ( ! metadata->value( QStringLiteral( "version_available" ) ).isEmpty() ) { @@ -966,13 +959,10 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item ) downloadUrl = downloadUrl.replace( QStringLiteral( "download/" ), QString() ); } - html += QStringLiteral( "%1 %4 " - "" + html += QStringLiteral( "%1 %3" ).arg( tr( "Available version" ), - tr( "in" ), - metadata->value( QStringLiteral( "zip_repository" ) ), - metadata->value( QStringLiteral( "version_available" ) ), - downloadUrl ); + downloadUrl, + metadata->value( QStringLiteral( "version_available" ) ) ); } if ( ! metadata->value( QStringLiteral( "changelog" ) ).isEmpty() ) diff --git a/src/app/pluginmanager/qgspluginsortfilterproxymodel.h b/src/app/pluginmanager/qgspluginsortfilterproxymodel.h index d2e2b229ad7c..a9bbe17996bd 100644 --- a/src/app/pluginmanager/qgspluginsortfilterproxymodel.h +++ b/src/app/pluginmanager/qgspluginsortfilterproxymodel.h @@ -29,7 +29,6 @@ const int PLUGIN_ERROR_ROLE = Qt::UserRole + 5; // for filtering const int PLUGIN_STATUS_ROLE = Qt::UserRole + 6; // for filtering and sorting 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 SPACER_ROLE = Qt::UserRole + 20; // for sorting