Skip to content
Permalink
Browse files
Only show storate type and comment metadata information when present
  • Loading branch information
nirvn authored and nyalldawson committed Aug 24, 2021
1 parent dfbbb94 commit 90b104ffe03fbb229104566c18e7ed5c4df55e48
@@ -25,6 +25,7 @@
#include "qgslogger.h"
#include "qgsmaplayerlegend.h"
#include "qgsmaplayerfactory.h"
#include "qgsmaplayerutils.h"
#include "qgsmeshdataprovider.h"
#include "qgsmeshdatasetgroupstore.h"
#include "qgsmeshlayer.h"
@@ -32,6 +32,8 @@
#include "qgsmaplayerlegend.h"
#include "qgsxmlutils.h"
#include "qgsmaplayerfactory.h"
#include "qgsmaplayerutils.h"

#include <QUrl>

QgsPointCloudLayer::QgsPointCloudLayer( const QString &uri,
@@ -24,6 +24,7 @@ email : tim at linfiniti.com
#include "qgslayermetadataformatter.h"
#include "qgslogger.h"
#include "qgsmaplayerlegend.h"
#include "qgsmaplayerutils.h"
#include "qgsmaptopixel.h"
#include "qgsmessagelog.h"
#include "qgsmultibandcolorrenderer.h"
@@ -5128,10 +5128,16 @@ QString QgsVectorLayer::htmlMetadata() const
myMetadata += QgsMapLayerUtils::generalHtmlMetadata( this );

// storage type
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Storage" ) + QStringLiteral( "</td><td>" ) + storageType() + QStringLiteral( "</td></tr>\n" );
if ( !storageType().isEmpty() )
{
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Storage" ) + QStringLiteral( "</td><td>" ) + storageType() + QStringLiteral( "</td></tr>\n" );
}

// comment
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Comment" ) + QStringLiteral( "</td><td>" ) + dataComment() + QStringLiteral( "</td></tr>\n" );
if ( !dataComment().isEmpty() )
{
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Comment" ) + QStringLiteral( "</td><td>" ) + dataComment() + QStringLiteral( "</td></tr>\n" );
}

// encoding
const QgsVectorDataProvider *provider = dataProvider();

0 comments on commit 90b104f

Please sign in to comment.