summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishesh Handa <me@vhanda.in>2012-08-08 10:56:14 (GMT)
committerVishesh Handa <me@vhanda.in>2012-08-08 10:58:55 (GMT)
commite4d8cd1f76192dc798f2db09b9e19310d7c1d65f (patch)
tree4e86d2c73efe7313653723d24ac03a33f16b431e
parent2af260b9096ece0c357b4ac5dd1fd412c0c1abc9 (diff)
ResourceData: Load the data in hasProperty( prop, value )
Don't know how we missed this. Reviewed by: Sebastian Trueg
-rw-r--r--libnepomukcore/resource/resourcedata.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libnepomukcore/resource/resourcedata.cpp b/libnepomukcore/resource/resourcedata.cpp
index 56198bd..f3590f3 100644
--- a/libnepomukcore/resource/resourcedata.cpp
+++ b/libnepomukcore/resource/resourcedata.cpp
@@ -202,6 +202,7 @@ QHash<QUrl, Nepomuk2::Variant> Nepomuk2::ResourceData::allProperties()
bool Nepomuk2::ResourceData::hasProperty( const QUrl& uri )
{
load();
+
QHash<QUrl, Variant>::const_iterator it = m_cache.constFind( uri );
if( it == m_cache.constEnd() )
return false;
@@ -212,6 +213,8 @@ bool Nepomuk2::ResourceData::hasProperty( const QUrl& uri )
bool Nepomuk2::ResourceData::hasProperty( const QUrl& p, const Variant& v )
{
+ load();
+
QHash<QUrl, Variant>::const_iterator it = m_cache.constFind( p );
if( it == m_cache.constEnd() )
return false;