[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:07:35 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=2923d4d

The following commit has been merged in the master branch:
commit 2923d4df77f21c467e82465437554b4d9a4956f4
Author: Vishesh Handa <me at vhanda.in>
Date:   Sat Mar 2 21:49:50 2013 +0530

    Make sure the Nepomuk data is discardable
    
    It should not be backed up with normal Nepomuk data. It can easily be
    reconstructued.
---
 kpeople/nepomuk-feeder/nepomuk-storage.cpp | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/kpeople/nepomuk-feeder/nepomuk-storage.cpp b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
index 326539d..04b820a 100644
--- a/kpeople/nepomuk-feeder/nepomuk-storage.cpp
+++ b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
@@ -40,6 +40,7 @@
 #include <Nepomuk2/Vocabulary/PIMO>
 #include <Soprano/Vocabulary/RDF>
 #include <Soprano/Vocabulary/NAO>
+#include <Soprano/Vocabulary/NRL>
 
 #include <Soprano/Model>
 #include <Soprano/QueryResultIterator>
@@ -607,7 +608,12 @@ void NepomukStorage::createContact(const QString &path, const Tp::ContactPtr &co
     Nepomuk2::SimpleResourceGraph graph;
     graph << newPersonContact << newImAccount;
 
-    Nepomuk2::StoreResourcesJob *job = graph.save();
+    QHash<QUrl, QVariant> additional;
+    additional.insert(RDF::type(), NRL::DiscardableInstanceBase());
+
+    Nepomuk2::StoreResourcesJob *job = Nepomuk2::storeResources(graph, Nepomuk2::IdentifyNone,
+                                                                Nepomuk2::NoStoreResourcesFlags,
+                                                                additional);
     job->exec();
     if (job->error()) {
         kError() << job->errorString();
@@ -699,7 +705,11 @@ void NepomukStorage::setContactAvatar(const QString &path,
 
 void NepomukStorage::onContactTimer()
 {
-    KJob *job = Nepomuk2::storeResources(m_graph, Nepomuk2::IdentifyNew, Nepomuk2::OverwriteAllProperties);
+    QHash<QUrl, QVariant> additional;
+    additional.insert(RDF::type(), NRL::DiscardableInstanceBase());
+
+    KJob *job = Nepomuk2::storeResources(m_graph, Nepomuk2::IdentifyNew,
+                                         Nepomuk2::OverwriteAllProperties, additional);
     connect(job, SIGNAL(finished(KJob*)), this, SLOT(onContactGraphJob(KJob*)));
 
     m_graph.clear();

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list