[Nepomuk] Nepomuk Core - Questions & Patches

Vishesh Handa handa.vish at gmail.com
Fri May 7 23:02:35 CEST 2010


>
>
> FINALLY SOMEONE LOOKS AT THIS STUFF BESIDES ME!!!!!!!!!!!!!!!!
> THANK YOU! :)
>
>
:-)


> On 05/07/2010 01:15 PM, Vishesh Handa wrote:
> > 1. The *Nepomuk::ResourceData::hasProperty( const QUrl& uri )* function
> > currently uses the MAINMODEL to answer. It think it should use the
> > cache, as it would be faster. The function *hasProperty( const QUrl& p,
> > const Variant& v ) *also uses the cache. A patch has been provided.
>
> yes, please commit.
>
>
Done!


> > 2. The *Nepomuk::ResourceData::removeProperty( const QUrl& uri )*
> > function doesn't update the cache. The setProperty function does. It
> > should be symmetrical. I think.
>
> also correct.
>
> Can you backport this one?
>
>
Committed and backported.


You are correct. But as you said the method is not used anyway, so we
> better remove it. right?
>

I was going through the code again and the documentation clearly mentions
that this function is meant for properties whose cardinality is one. (I
missed this!)

         /**
         * Update a property. This means an existing property is replaced if
it differs from
         * the provided value. Otherwise nothing is done.
         *
         * This method assumes that the cardinality or property is 1.
         */

So, it's doing exactly what it should. There is no reason to remove it. We
could put a warning if the cardinality is greater than 1 or modify it so
that it doesn't do anything if the cardinality > 1. I'll write a patch
tomorrow.

- Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/nepomuk/attachments/20100508/2a1281c2/attachment.htm 


More information about the Nepomuk mailing list