Skip to content

Commit

Permalink
Update QgsRectangle test covering QVariant to make it both Qt5 and Qt…
Browse files Browse the repository at this point in the history
…6 compatible
  • Loading branch information
nirvn committed Nov 23, 2024
1 parent c468898 commit eb27ef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/core/geometry/testqgsrectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ void TestQgsRectangle::asVariant()
const QVariant var = QVariant::fromValue( rect1 );
QVERIFY( var.isValid() );
QCOMPARE( var.userType(), qMetaTypeId<QgsRectangle>() );
QVERIFY( !var.canConvert< QgsReferencedRectangle >() );
QVERIFY( !var.convert( QMetaType::fromType<QgsReferencedRectangle >() ) );

const QgsRectangle rect2 = qvariant_cast<QgsRectangle>( var );
QCOMPARE( rect2.xMinimum(), rect1.xMinimum() );
Expand Down

0 comments on commit eb27ef2

Please sign in to comment.