Skip to content

Commit 084a2b8

Browse files
committedJun 1, 2021
fix test by using non deprecated enum
1 parent bb1693b commit 084a2b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎tests/src/core/testqgis.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "qgis.h"
2525
#include "qgsmaplayermodel.h"
2626
#include "qgsattributeeditorelement.h"
27-
#include "qgsattributeeditorrelation.h"
27+
#include "qgsfieldproxymodel.h"
2828

2929
/**
3030
* \ingroup UnitTests
@@ -451,13 +451,13 @@ void TestQgis::testQgsEnumKeyToValue()
451451

452452
void TestQgis::testQgsFlagValueToKeys()
453453
{
454-
QgsAttributeEditorRelation::Buttons buttons = QgsAttributeEditorRelation::Button::Link | QgsAttributeEditorRelation::Button::AddChildFeature;
455-
QCOMPARE( qgsFlagValueToKeys( buttons ), QStringLiteral( "Link|AddChildFeature" ) );
454+
QgsFieldProxyModel::Filters filters = QgsFieldProxyModel::Filter::String | QgsFieldProxyModel::Filter::Double;
455+
QCOMPARE( qgsFlagValueToKeys( filters ), QStringLiteral( "String|Double" ) );
456456
}
457457
void TestQgis::testQgsFlagKeysToValue()
458458
{
459-
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "Link|AddChildFeature" ), QgsAttributeEditorRelation::Buttons( QgsAttributeEditorRelation::Button::AllButtons ) ), QgsAttributeEditorRelation::Button::Link | QgsAttributeEditorRelation::Button::AddChildFeature );
460-
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "UnknownKey" ), QgsAttributeEditorRelation::Buttons( QgsAttributeEditorRelation::Button::AllButtons ) ), QgsAttributeEditorRelation::Buttons( QgsAttributeEditorRelation::Button::AllButtons ) );
459+
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "String|Double" ), QgsFieldProxyModel::Filters( QgsFieldProxyModel::Filter::AllTypes ) ), QgsFieldProxyModel::Filter::String | QgsFieldProxyModel::Filter::Double );
460+
QCOMPARE( qgsFlagKeysToValue( QStringLiteral( "UnknownKey" ), QgsFieldProxyModel::Filters( QgsFieldProxyModel::Filter::AllTypes ) ), QgsFieldProxyModel::Filters( QgsFieldProxyModel::Filter::AllTypes ) );
461461
}
462462

463463
void TestQgis::testQMapQVariantList()

0 commit comments

Comments
 (0)
Please sign in to comment.