summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishesh Handa <me@vhanda.in>2012-08-30 11:19:06 (GMT)
committerVishesh Handa <me@vhanda.in>2012-08-30 11:21:16 (GMT)
commit328fbfd8a6fc66bf0b10bda7813b4827e3118d72 (patch)
tree5823d88c4719ac6dfd7928500fb2e9c278628e4d
parent0d41e40878a4ba50228b7659e019a9737a9727fd (diff)
QueryLib: Remove unnecessary terms in file queriesv4.9.1
When limiting the search for files, one doesn't need to explicitly filter the results by OR ( file, folder ). One can just limit it to nfo:FileDataObjects. All folders are always given the type of nfo:FileDataObject.
-rw-r--r--libnepomukcore/query/query.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnepomukcore/query/query.cpp b/libnepomukcore/query/query.cpp
index 484893f..21b9aa3 100644
--- a/libnepomukcore/query/query.cpp
+++ b/libnepomukcore/query/query.cpp
@@ -420,7 +420,7 @@ QString Nepomuk2::Query::Query::toSparqlQuery( SparqlFlags sparqlFlags ) const
else if( d->m_fileMode == FileQuery::QueryFolders )
fileModeTerm = AndTerm( folderTerm, NegationTerm::negateTerm( fileTerm ) );
else
- fileModeTerm = OrTerm( fileTerm, folderTerm );
+ fileModeTerm = fileTerm;
term = AndTerm( term, fileModeTerm, d->createFolderFilter() );
}