Skip to content

Commit f9fa606

Browse files
committed
add note with Qt bug
1 parent 5fa533f commit f9fa606

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/qgis.h

+5
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,12 @@ inline QString qgsDoubleToString( double a, int precision = 17 )
241241
if ( precision )
242242
return QString::number( a, 'f', precision ).remove( QRegularExpression( "\\.?0+$" ) );
243243
else
244+
#if QT_VERSION > QT_VERSION_CHECK( 5, 10, 0 )
245+
// see https://bugreports.qt.io/browse/QTBUG-71439
244246
return QString::number( a, 'f', precision ).replace( QRegularExpression( "^-0$" ), QLatin1Literal( "0" ) );
247+
#else
248+
return QString::number( a, 'f', precision );
249+
#endif
245250
}
246251

247252
/**

0 commit comments

Comments
 (0)