@@ -302,9 +302,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
302
302
QCOMPARE ( widget1->value ( ), QVariant ( QVariant::Double ) );
303
303
QCOMPARE ( editor1->mLineEdit ->text (), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );
304
304
editor1->mLineEdit ->setText ( QString ( " 151%1" ).arg ( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
305
- QCOMPARE ( widget1->value ( ), 151 );
305
+ QCOMPARE ( widget1->value ( ). toInt () , 151 );
306
306
editor1->mLineEdit ->setText ( QString ( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append ( QStringLiteral ( " 161" ) ) );
307
- QCOMPARE ( widget1->value ( ), 161 );
307
+ QCOMPARE ( widget1->value ( ). toInt () , 161 );
308
308
309
309
310
310
QgsSpinBox *editor0 = qobject_cast<QgsSpinBox *>( widget0->createWidget ( nullptr ) );
@@ -322,9 +322,9 @@ void TestQgsRangeWidgetWrapper::test_nulls()
322
322
QCOMPARE ( editor0->mLineEdit ->text (), QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY );
323
323
324
324
editor0->mLineEdit ->setText ( QString ( " 150%1" ).arg ( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ) );
325
- QCOMPARE ( widget0->value ( ), 150 );
325
+ QCOMPARE ( widget0->value ( ). toInt () , 150 );
326
326
editor0->mLineEdit ->setText ( QString ( QgsDoubleSpinBox::SPECIAL_TEXT_WHEN_EMPTY ).append ( QStringLiteral ( " 160" ) ) );
327
- QCOMPARE ( widget0->value ( ), 160 );
327
+ QCOMPARE ( widget0->value ( ). toInt () , 160 );
328
328
329
329
}
330
330
0 commit comments