QgsFeatureRequest::QgsFeatureRequest( const QgsExpression& expr ) : mFilter( FilterExpression ) , mFilterFid( -1 ) , mFilterExpression( new QgsExpression( expr.expression() ) ) , mFlags( 0 ) { }
void TestQgsOgcUtils::testExpressionFromOgcFilter() { QFETCH( QString, xmlText ); QFETCH( QString, dumpText ); QDomDocument doc; QVERIFY( doc.setContent( xmlText, true ) ); QDomElement rootElem = doc.documentElement(); QgsExpression* expr = QgsOgcUtils::expressionFromOgcFilter( rootElem ); QVERIFY( expr ); qDebug( "OGC XML : %s", xmlText.toAscii().data() ); qDebug( "EXPR-DUMP: %s", expr->expression().toAscii().data() ); if ( expr->hasParserError() ) qDebug( "ERROR: %s ", expr->parserErrorString().toAscii().data() ); QVERIFY( !expr->hasParserError() ); QCOMPARE( dumpText, expr->expression() ); delete expr; }