[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:04:22 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=d9e06f0
The following commit has been merged in the master branch:
commit d9e06f0d1917391ca4461c09e93d10ec8353806a
Author: George Goldberg <grundleborg at googlemail.com>
Date: Sat Jun 20 18:59:20 2009 +0000
Get the PIMO person for from Nepomuk, using the HACK of nepomuk:/myself, which needs to be fixed once there is a standard way of doing it. Also create the pimo:person if it doesn't already exist.
svn path=/trunk/playground/network/telepathy-integration-daemon/; revision=984448
---
kpeople/nepomuk-feeder/main.cpp | 4 ++++
kpeople/nepomuk-feeder/telepathyaccount.cpp | 14 +++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/kpeople/nepomuk-feeder/main.cpp b/kpeople/nepomuk-feeder/main.cpp
index cd0a8d7..b621a3b 100644
--- a/kpeople/nepomuk-feeder/main.cpp
+++ b/kpeople/nepomuk-feeder/main.cpp
@@ -29,6 +29,8 @@ extern "C"
#include <QtCore/QCoreApplication>
+#include <Nepomuk/ResourceManager>
+
namespace
{
static void signal_handler(int signal)
@@ -46,6 +48,8 @@ int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
+ Nepomuk::ResourceManager::instance()->init();
+
// Create an instance of the Telepathy Account Monitor.
TelepathyAccountMonitor *monitor = new TelepathyAccountMonitor(&app);
diff --git a/kpeople/nepomuk-feeder/telepathyaccount.cpp b/kpeople/nepomuk-feeder/telepathyaccount.cpp
index 17e8c62..1a46b2d 100644
--- a/kpeople/nepomuk-feeder/telepathyaccount.cpp
+++ b/kpeople/nepomuk-feeder/telepathyaccount.cpp
@@ -20,6 +20,10 @@
#include "telepathyaccount.h"
+#include "pimo.h"
+
+#include <Nepomuk/Thing>
+
TelepathyAccount::TelepathyAccount(const QString &path, QObject *parent)
: QObject(parent),
m_path(path)
@@ -36,8 +40,12 @@ TelepathyAccount::~TelepathyAccount()
void TelepathyAccount::doNepomukSetup()
{
- // Query Nepomuk to find out if the "me" pimo:person has a nco:contact instance for this
- // Telepathy instant messaging account.
+ // Get the PIMO:Person for "me" from nepomuk
+ Nepomuk::Thing me(QUrl::fromEncoded("nepomuk:/myself"));
- // TODO: Implement me!
+ if (!me.exists()) {
+ // The PIMO:Person representing "me" does not exist, so we need to create it.
+ me.addType(Nepomuk::Vocabulary::PIMO::Person());
+ }
}
+
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list