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

List:       kde-bugs-dist
Subject:    [nepomuk] [Bug 313781] Impossible to create valid resources if nepomuk starts before the nepomuk usi
From:       Marco Martin <notmart () gmail ! com>
Date:       2013-01-31 20:31:02
Message-ID: bug-313781-17878-wFkzO4b8Z3 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=313781

--- Comment #1 from Marco Martin <notmart@gmail.com> ---
Playing a bit around, this seems to solve the issue.

Don't know how much of an hack it is, but recreating mainmodel from scratch
makes queries work and resources be valid after
ResourceManager::nepomukSystemStarted() is emitted

diff --git a/libnepomukcore/resource/resourcemanager.cpp
b/libnepomukcore/resource/resourcemanager.cpp
index 2b32be0..ce3d578 100644
--- a/libnepomukcore/resource/resourcemanager.cpp
+++ b/libnepomukcore/resource/resourcemanager.cpp
@@ -142,7 +142,11 @@ void
Nepomuk2::ResourceManagerPrivate::_k_storageServiceInitialized( bool succes
 {
     if( success ) {
         kDebug() << "Nepomuk Storage service up and initialized.";
+        delete mainModel;
+        mainModel = 0;
         m_manager->init();
+        //m_manager->d->mainModel->init();
+        //m_manager->d->mainModel->connect();
         emit m_manager->nepomukSystemStarted();
     }
 }

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

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