Navigation Menu

Skip to content

Commit

Permalink
Fix QCOMPARE in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 18, 2018
1 parent d179635 commit 0edb224
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/gui/testqgsrangewidgetwrapper.cpp
Expand Up @@ -302,9 +302,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
QCOMPARE( widget1->value( ), QVariant( QVariant::Double ) ); QCOMPARE( widget1->value( ), QVariant( QVariant::Double ) );
QCOMPARE( editor1->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ); QCOMPARE( editor1->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );
editor1->mLineEdit->setText( QString( "151%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) ); editor1->mLineEdit->setText( QString( "151%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
QCOMPARE( widget1->value( ), 151 ); QCOMPARE( widget1->value( ).toInt(), 151 );
editor1->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "161" ) ) ); editor1->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "161" ) ) );
QCOMPARE( widget1->value( ), 161 ); QCOMPARE( widget1->value( ).toInt(), 161 );




QgsSpinBox *editor0 = qobject_cast<QgsSpinBox *>( widget0->createWidget( nullptr ) ); QgsSpinBox *editor0 = qobject_cast<QgsSpinBox *>( widget0->createWidget( nullptr ) );
Expand All @@ -322,9 +322,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
QCOMPARE( editor0->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ); QCOMPARE( editor0->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );


editor0->mLineEdit->setText( QString( "150%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) ); editor0->mLineEdit->setText( QString( "150%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
QCOMPARE( widget0->value( ), 150 ); QCOMPARE( widget0->value( ).toInt(), 150 );
editor0->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "160" ) ) ); editor0->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "160" ) ) );
QCOMPARE( widget0->value( ), 160 ); QCOMPARE( widget0->value( ).toInt(), 160 );


} }


Expand Down

0 comments on commit 0edb224

Please sign in to comment.