Skip to content
Permalink
Browse files
Address review
  • Loading branch information
nirvn authored and nyalldawson committed Aug 24, 2021
1 parent 090ef3e commit 9847c9f367e75e21de209a1330a7b7c6d4b6c8e1
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsmaplayer.cpp
@@ -2213,12 +2213,12 @@ QString QgsMapLayer::generalHtmlMetadata() const
isLocalPath = true;
metadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Path" ) + QStringLiteral( "</td><td>%1" ).arg( QStringLiteral( "<a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( path ).toString(), QDir::toNativeSeparators( path ) ) ) + QStringLiteral( "</td></tr>\n" );

qint64 fileSize = fi.size();
QDateTime lastModified = fi.lastModified();
QString lastModifiedFileName;
QSet<QString> sidecarFiles = QgsFileUtils::sidecarFilesForPath( path );
if ( fi.isFile() )
{
qint64 fileSize = fi.size();
if ( !sidecarFiles.isEmpty() )
{
lastModifiedFileName = fi.fileName();
@@ -2238,7 +2238,7 @@ QString QgsMapLayer::generalHtmlMetadata() const
}
metadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + ( !sidecarFiles.isEmpty() ? tr( "Total size" ) : tr( "Size" ) ) + QStringLiteral( "</td><td>%1" ).arg( QgsFileUtils::representFileSize( fileSize ) ) + QStringLiteral( "</td></tr>\n" );
}
metadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Last modified" ) + QStringLiteral( "</td><td>%1" ).arg( QLocale().toString( fi.lastModified() ) ) + ( !lastModifiedFileName.isEmpty() ? QStringLiteral( " (%1)" ).arg( lastModifiedFileName ) : "" ) + QStringLiteral( "</td></tr>\n" );
metadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Last modified" ) + QStringLiteral( "</td><td>%1" ).arg( QLocale().toString( fi.lastModified() ) ) + ( !lastModifiedFileName.isEmpty() ? QStringLiteral( " (%1)" ).arg( lastModifiedFileName ) : QString() ) + QStringLiteral( "</td></tr>\n" );
}
}
if ( uriComponents.contains( QStringLiteral( "url" ) ) )

0 comments on commit 9847c9f

Please sign in to comment.