~ubuntu-branches/ubuntu/oneiric/kde4libs/oneiric-proposed

« back to all changes in this revision

Viewing changes to nepomuk/test/dynamicresourcefacettest.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-07-08 00:08:34 UTC
  • mto: This revision was merged to the branch mainline in revision 247.
  • Revision ID: package-import@ubuntu.com-20110708000834-dr9a8my4iml90qe5
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
using namespace Nepomuk::Types;
60
60
 
61
61
 
62
 
class DynamicResourceTestFacet::DynamicResourceTestFacet::TestPrivate : public DynamicResourceFacet::Private
 
62
class DynamicResourceTestFacet::TestPrivate : public DynamicResourceFacet::Private
63
63
{
64
64
public:
65
65
    void startQuery( const Nepomuk::Query::Query& query ) {
66
66
        // we cannot use the query service since that would ignore our custom model
67
67
        // thus, we perform a sync query and call _k_newEntries async from there
68
 
        Soprano::QueryResultIterator it = ResourceManager::instance()->mainModel()->executeQuery( query.toSparqlQuery(), Soprano::Query::QueryLanguageSparql );
 
68
        Nepomuk::Query::Query ourQuery(query);
 
69
        // disable result restrictions since we do not support those in our custom model
 
70
        ourQuery.setQueryFlags(Nepomuk::Query::Query::NoResultRestrictions);
 
71
        Soprano::QueryResultIterator it = ResourceManager::instance()->mainModel()->executeQuery( ourQuery.toSparqlQuery(), Soprano::Query::QueryLanguageSparql );
69
72
        QList<Nepomuk::Query::Result> results;
70
73
        while( it.next() ) {
71
74
            results << Result( it[0].uri() );