mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[ui] improve metadata feature count string
- use unknown instead of -1 - use thousands separator
This commit is contained in:
parent
59dbe0e6c4
commit
1f31a9783c
@ -4220,7 +4220,9 @@ QString QgsVectorLayer::htmlMetadata() const
|
||||
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Unit" ) + QStringLiteral( "</td><td>" ) + QgsUnitTypes::toString( crs().mapUnits() ) + QStringLiteral( "</td></tr>\n" );
|
||||
|
||||
// feature count
|
||||
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Feature count" ) + QStringLiteral( "</td><td>" ) + QString::number( featureCount() ) + QStringLiteral( "</td></tr>\n" );
|
||||
QLocale locale = QLocale();
|
||||
locale.setNumberOptions( locale.numberOptions() &= ~QLocale::NumberOption::OmitGroupSeparator );
|
||||
myMetadata += QStringLiteral( "<tr><td class=\"highlight\">" ) + tr( "Feature count" ) + QStringLiteral( "</td><td>" ) + ( featureCount() == -1 ? tr( "unknown" ) : locale.toString( ( qlonglong )featureCount() ) ) + QStringLiteral( "</td></tr>\n" );
|
||||
|
||||
// End Provider section
|
||||
myMetadata += QLatin1String( "</table>\n<br><br>" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user