[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdebase/runtime/nepomuk/services/storage
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2010-08-10 9:47:56
Message-ID: 20100810094756.3F638AC7E8 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1161536 by tokoe:

Try harder to find out the used storage backend.

This prevents returning an empty string when using 4.4
with a newer release of soprano.
Thanks to Will Stephenson for the patch!


 M  +5 -2      storage.cpp  


--- branches/KDE/4.4/kdebase/runtime/nepomuk/services/storage/storage.cpp \
#1161535:1161536 @@ -76,9 +76,12 @@
 
 QString Nepomuk::Storage::usedSopranoBackend() const
 {
-    if ( Repository* rep = static_cast<Repository*>( m_core->model( QLatin1String( \
"main" ) ) ) ) +    if ( Repository* rep = dynamic_cast<Repository*>( m_core->model( \
QLatin1String( "main" ) ) ) )  return rep->usedSopranoBackend();
-    else
+    else if ( Soprano::FilterModel *fm = dynamic_cast<Soprano::FilterModel*>( \
m_core->model( QLatin1String( "main" ) ) ) ) { +        if ( Repository *rep = \
dynamic_cast<Repository*>( fm->parentModel() ) ) +            return \
rep->usedSopranoBackend(); +    }
         return QString();
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic