Summary: | commit ead226c9571 makes newEntries/entriesRemoved not work for some queries | ||
---|---|---|---|
Product: | [Unmaintained] nepomuk | Reporter: | Marco Martin <notmart> |
Component: | queryservice | Assignee: | Nepomuk Bugs Coordination <nepomuk-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | me |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/nepomuk-core/9ece545a7d19905b8274873a6b23d4f43b144c33 | Version Fixed In: | |
Sentry Crash Report: |
Description
Marco Martin
2013-01-10 19:08:50 UTC
I cannot seem to reproduce this. Here is the code that I used - Tag tag("KDE"); Query::ResourceTypeTerm typeTerm( NFO::FileDataObject() ); Query::ComparisonTerm term( NAO::hasTag(), Query::ResourceTerm(tag) ); Query::Query query( typeTerm && term ); Query::QueryServiceClient* client = new Query::QueryServiceClient( this ); connect( client, SIGNAL(newEntries(QList<Nepomuk2::Query::Result>)), this, SLOT(newEntries(QList<Nepomuk2::Query::Result>)) ); connect( client, SIGNAL(entriesRemoved(QList<QUrl>)), this, SLOT(entriesRemoved(QList<QUrl>)) ); connect( client, SIGNAL(resultCount(int)), this, SLOT(resultCount(int)) ); client->query( query ); The resulting query - <?xml version="1.0"?><query limit="0" offset="0" fullTextScoring="false" fullTextScoringOrder="desc" flags=""><and><type uri="http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject"/><comparison property="http://www.semanticdesktop.org/ontologies/2007/08/15/nao#hasTag" comparator=":" inverted="false"><resource uri="nepomuk:/res/b2e38e46-9123-407a-8f7d-e34e95931e1d"/></comparison></and></query> I added the KDE tag via Dolphin to a file, and remove the tag. Both times, the appropriate slot was called. Could you possible create a small application which I can use to reproduce it? i can confirm that it works with the above query the query that gives me problems is: "<?xml version=\"1.0\"?><query limit=\"0\" offset=\"0\" fullTextScoring=\"false\" fullTextScoringOrder=\"desc\" flags=\"NoResultRestrictions\"><and><type uri=\"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject\"/><comparison property=\"http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated\" comparator=\":\" inverted=\"true\"><resource uri=\"nepomuk:/res/64e8b60e-361d-45ec-9582-e3c8dc8bec43\"/></comparison></and></query>" i tried also to do an inverted query about tags, but that works as well a simpler query on activities, <?xml version="1.0"?><query limit="0" offset="0" fullTextScoring="false" fullTextScoringOrder="desc" flags=""><comparison property="http://www.semanticdesktop.org/ontologies/2007/08/15/nao#isRelated" comparator=":" inverted="true"><resource uri="nepomuk:/res/64e8b60e-361d-45ec-9582-e3c8dc8bec43"/></comparison></query> seems to work correctly, noticing items that are linked/unlinked to an activity another finding: in the query that doesn't work, if i remove the term in and <type uri=\"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject\"/> seems to fix it. Git commit 9ece545a7d19905b8274873a6b23d4f43b144c33 by Marco Martin. Committed on 23/01/2013 at 14:01. Pushed by mart into branch 'KDE/4.10'. don't add a type to the watcher if we narrow down the types watched, when properties that are catched by and inverted term change, they won't be signaled if the object where those properties belong is of the wrong type: example: isRelated property for activities, if we do a query asking for items of type FileDataObject M +1 -2 services/storage/query/folder.cpp http://commits.kde.org/nepomuk-core/9ece545a7d19905b8274873a6b23d4f43b144c33 |