Skip to content

Commit 0edb224

Browse files
committedSep 18, 2018
Fix QCOMPARE in the test
1 parent d179635 commit 0edb224

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎tests/src/gui/testqgsrangewidgetwrapper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
302302
QCOMPARE( widget1->value( ), QVariant( QVariant::Double ) );
303303
QCOMPARE( editor1->mLineEdit->text(), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );
304304
editor1->mLineEdit->setText( QString( "151%1" ).arg( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
305-
QCOMPARE( widget1->value( ), 151 );
305+
QCOMPARE( widget1->value( ).toInt(), 151 );
306306
editor1->mLineEdit->setText( QString( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append( QStringLiteral( "161" ) ) );
307-
QCOMPARE( widget1->value( ), 161 );
307+
QCOMPARE( widget1->value( ).toInt(), 161 );
308308

309309

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

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

329329
}
330330

0 commit comments

Comments
 (0)
Please sign in to comment.