Skip to content

Commit

Permalink
add note with Qt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 26, 2018
1 parent 5fa533f commit f9fa606
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgis.h
Expand Up @@ -241,7 +241,12 @@ inline QString qgsDoubleToString( double a, int precision = 17 )
if ( precision )
return QString::number( a, 'f', precision ).remove( QRegularExpression( "\\.?0+$" ) );
else
#if QT_VERSION > QT_VERSION_CHECK( 5, 10, 0 )
// see https://bugreports.qt.io/browse/QTBUG-71439
return QString::number( a, 'f', precision ).replace( QRegularExpression( "^-0$" ), QLatin1Literal( "0" ) );
#else
return QString::number( a, 'f', precision );
#endif
}

/**
Expand Down

0 comments on commit f9fa606

Please sign in to comment.