Skip to content
Permalink
Browse files

Merge pull request #3072 from rouault/qt5_fix_testqgsfield

Make qgis_fieldtest all Qt 5.X compatible
  • Loading branch information
nyalldawson committed May 15, 2016
2 parents c4819ad + 202420c commit 5c7f4c76649998bb754246f0726a5ea6483b1936
Showing with 4 additions and 6 deletions.
  1. +0 −1 ci/travis/linux/qt5/blacklist.txt
  2. +4 −5 tests/src/core/testqgsfield.cpp
@@ -19,4 +19,3 @@ qgis_composermapgridtest
qgis_composertabletest
qgis_composertablev2test
qgis_composerutils
qgis_fieldtest
@@ -217,11 +217,10 @@ void TestQgsField::convertCompatible()
QVERIFY( stringField.convertCompatible( nullInt ) );
QCOMPARE( nullInt.type(), QVariant::String );
QVERIFY( nullInt.isNull() );
QVariant doubleVar( 9.7 );
QVariant doubleVar( 1.25 );
QVERIFY( stringField.convertCompatible( doubleVar ) );
QCOMPARE( doubleVar.type(), QVariant::String );
// Should be fixed in Qt 5.7: https://bugreports.qt.io/browse/QTBUG-47192
QCOMPARE( doubleVar, QVariant( "9.7" ) );
QCOMPARE( doubleVar, QVariant( "1.25" ) );
QVariant nullDouble = QVariant( QVariant::Double );
QVERIFY( stringField.convertCompatible( nullDouble ) );
QCOMPARE( nullDouble.type(), QVariant::String );
@@ -246,10 +245,10 @@ void TestQgsField::convertCompatible()
QVERIFY( doubleField.convertCompatible( nullInt ) );
QCOMPARE( nullInt.type(), QVariant::Double );
QVERIFY( nullInt.isNull() );
doubleVar = QVariant( 9.7 );
doubleVar = QVariant( 1.25 );
QVERIFY( doubleField.convertCompatible( doubleVar ) );
QCOMPARE( doubleVar.type(), QVariant::Double );
QCOMPARE( doubleVar, QVariant( 9.7 ) );
QCOMPARE( doubleVar, QVariant( 1.25 ) );
nullDouble = QVariant( QVariant::Double );
QVERIFY( doubleField.convertCompatible( nullDouble ) );
QCOMPARE( nullDouble.type(), QVariant::Double );

0 comments on commit 5c7f4c7

Please sign in to comment.
You can’t perform that action at this time.