Hi. <br><br>I was going through the Nepomuk framework in my normal fashion, and I happened to notice a couple of things.<br><br>1. The <b>Nepomuk::ResourceData::hasProperty( const QUrl& uri )</b> function currently uses the MAINMODEL to answer. It think it should use the cache, as it would be faster. The function <b>hasProperty( const QUrl& p, const Variant& v ) </b>also uses the cache. A patch has been provided.<br>
<br>2. The <b>Nepomuk::ResourceData::removeProperty( const QUrl& uri )</b> function doesn't update the cache. The setProperty function does. It should be symmetrical. I think.<br><br>3. In <b>Nepomuk::ResourceFilterModel::updateProperty( const QUrl& resource, const QUrl& property, const Node& value )</b> shouldn't the line if( it.hasNext() ) be a while( it.hasNext() ) ? I haven't tested it out, but I think this is what should happen -<br>
<br>Let's say I have a resource with a uri and certain properties.<br><br>uri a rdf:Resource .<br>uri a rxx:A .<br>uri a rxx:B .<br><br>and I call the function <b>updateProperty</b>( uri, rdf:type, rxx:C ). The current implementation would get all the above 3 statements (I'm not sure in what order) . Suppose it got <i>"uri a rdf:Resource</i>" first. It would then proceed to remove the statement and add the <i>"uri a rxx:C" </i>statement. This doesn't seem right. <br>
<br>IMO, it should either delete all matching statements and add the one specified in the arguments or it should take an oldValue and newValue and accordingly change. KDevelop says it isn't used anywhere, so this isn't really that important. :-/<br>
<br>Thanks<br><br>- Vishesh Handa<br>