Skip to content
Permalink
Browse files

[Plugin manager][needs-docs] Better looking links to the installed an…

…d available version. Remove no longer used code.
  • Loading branch information
borysiasty committed Sep 14, 2018
1 parent 8b07b4e commit 3dc0c5670e43141afb76d4169b127a5621cda616
@@ -149,7 +149,6 @@
<file>themes/default/copyright_label.svg</file>
<file>themes/default/dbmanager.svg</file>
<file>themes/default/extents.svg</file>
<file>themes/default/externalLink.svg</file>
<file>themes/default/gpsicons/barchart.svg</file>
<file>themes/default/gpsicons/polarchart.svg</file>
<file>themes/default/grass_location.svg</file>

This file was deleted.

@@ -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;"
" }"
"</style>";

if ( !metadata->value( QStringLiteral( "plugin_id" ) ).isEmpty() )
@@ -948,14 +944,11 @@ void QgsPluginManager::showPluginDetails( QStandardItem *item )
{
localDir = QFileInfo( localDir ).absolutePath();
}

html += QStringLiteral( "<tr><td class='key'>%1 </td><td class='version' title='%2 %3'> %4 <a href=\"%5\">"
"<img src=\"qrc:/images/themes/default/externalLink.svg\"></a></td></tr>"
html += QStringLiteral( "<tr><td class='key'>%1 </td><td title='%2'><a href='%3'>%4</a></td></tr>"
).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( "<tr><td class='key'>%1 </td><td class='version' title='%2 %3'> %4 <a href=\"%5\">"
"<img src=\"qrc:/images/themes/default/externalLink.svg\"></a></td></tr>"
html += QStringLiteral( "<tr><td class='key'>%1 </td><td title='%2'><a href='%2'>%3</a></td></tr>"
).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() )
@@ -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


0 comments on commit 3dc0c56

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