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