[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:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-03-22 11:04:39
Message-ID: 20100322110439.477A2AC877 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1106246 by trueg:

Backport: do not crash if the system setup is broken and Nepomuk cannot find the \
Virtuoso Soprano backend.

 M  +4 -1      repository.cpp  
 M  +4 -1      storage.cpp  


--- branches/KDE/4.4/kdebase/runtime/nepomuk/services/storage/repository.cpp \
#1106245:1106246 @@ -305,7 +305,10 @@
 
 QString Nepomuk::Repository::usedSopranoBackend() const
 {
-    return m_backend->pluginName();
+    if ( m_backend )
+        return m_backend->pluginName();
+    else
+        return QString();
 }
 
 
--- branches/KDE/4.4/kdebase/runtime/nepomuk/services/storage/storage.cpp \
#1106245:1106246 @@ -76,7 +76,10 @@
 
 QString Nepomuk::Storage::usedSopranoBackend() const
 {
-    return static_cast<Repository*>( m_core->model( QLatin1String( "main" ) ) \
)->usedSopranoBackend(); +    if ( Repository* rep = static_cast<Repository*>( \
m_core->model( QLatin1String( "main" ) ) ) ) +        return \
rep->usedSopranoBackend(); +    else
+        return QString();
 }
 
 #include "storage.moc"


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

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