forked from qt-creator/qt-creator
AutoTest: Modernize code
* remove unnecessary QLatin1String where possible * foreach * nullptr * bad naming of static members Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -59,9 +59,9 @@ static QString formatResult(double value)
|
||||
{
|
||||
//NAN is not supported with visual studio 2010
|
||||
if (value < 0)// || value == NAN)
|
||||
return QLatin1String("NAN");
|
||||
return QString("NAN");
|
||||
if (value == 0)
|
||||
return QLatin1String("0");
|
||||
return QString("0");
|
||||
|
||||
int significantDigits = 0;
|
||||
qreal divisor = 1;
|
||||
@@ -83,7 +83,7 @@ static QString formatResult(double value)
|
||||
beforeDecimalPoint.append('0');
|
||||
|
||||
int afterUse = significantDigits - beforeUse;
|
||||
if (beforeDecimalPoint == QLatin1String("0") && !afterDecimalPoint.isEmpty()) {
|
||||
if (beforeDecimalPoint == QString("0") && !afterDecimalPoint.isEmpty()) {
|
||||
++afterUse;
|
||||
int i = 0;
|
||||
while (i < afterDecimalPoint.count() && afterDecimalPoint.at(i) == '0')
|
||||
|
||||
Reference in New Issue
Block a user