[Nepomuk] Nepomuk Core - Questions & Patches
Sebastian Trüg
trueg at kde.org
Wed May 26 09:33:00 CEST 2010
On 05/25/2010 08:40 PM, Vishesh Handa wrote:
> 1. If I call Resource( QString("file:/whatever") ) and whatever is
> actually a filex:/ url. It won't get identified, cause the filex:/
> searching is only applicable to QUrls.
You are right. While this is misuse of the API it should still be fixed.
> 2. Code like this is perfectly legal, and works (no modifications required)
>
> Resource r1( KUrl("nepomuk:/res/blah-blah") );
> r1.setRating( 5 );
> qDebug() << r1.rating();
>
> This is because determineUri() accepts uris whose scheme is "nepomuk",
> but don't really exist in the database. Should this be allowed?
That was my intention, yes.
> 3. When checking if the the m_kickoffUri is a nie:url for a resource.
> The nieUrl is assigned to be equal to the uri. This however gets fixed
> in the load(). And nieUrl isn't used anywhere, so it doesn't matter that
> much.
I suppose you mean this part:
if( it.next() ) {
QUrl uri = it["r"].uri();
if( uri.isEmpty() ) {
m_uri = m_kickoffUri;
}
else {
m_uri = uri;
m_nieUrl = uri;
}
The last two lines. AFAICT this is perfectly fine since in the latter
case both nie:url and resource URI are equal.
Cheers,
Sebastian
More information about the Nepomuk
mailing list