[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:30 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=263a4bc
The following commit has been merged in the master branch:
commit 263a4bc504e8838ae8b7f38c272404e35adee1e3
Author: Vishesh Handa <handa.vish at gmail.com>
Date: Tue Mar 20 21:40:31 2012 +0530
Set the account name and alias properly
nco:imNickname does not have a cardinality of 1, so we cannot use
storeResources in order to change its value.
Use SetProperty instead. Unit Testing++ :)
---
kpeople/nepomuk-feeder/nepomuk-storage.cpp | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/kpeople/nepomuk-feeder/nepomuk-storage.cpp b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
index 6ea0ec0..a215cd5 100644
--- a/kpeople/nepomuk-feeder/nepomuk-storage.cpp
+++ b/kpeople/nepomuk-feeder/nepomuk-storage.cpp
@@ -679,11 +679,11 @@ void NepomukStorage::setAccountNickname(const QString &path, const QString &nick
QUrl accountUri = account.account();
- Nepomuk::SimpleResource &accountRes = m_graph[accountUri];
- accountRes.setUri( accountUri );
- accountRes.setProperty( NCO::imNickname(), nickname );
-
- fireGraphTimer();
+ // imNickName does not have a max cardinality of 1
+ // so we cannot use to storeResources, as it will just add another value
+ KJob* job = Nepomuk::setProperty( QList<QUrl>() << accountUri, NCO::imNickname(),
+ QVariantList() << nickname );
+ connect( job, SIGNAL(finished(KJob*)), this, SLOT(onSaveJobResult(KJob*)) );
}
void NepomukStorage::setAccountCurrentPresence(const QString &path, const Tp::SimplePresence &presence)
@@ -827,12 +827,11 @@ void NepomukStorage::setContactAlias(const QString &path, const QString &id, con
QUrl imAccountUri = contact.imAccount();
- Nepomuk::SimpleResource &res = m_graph[imAccountUri];
- res.setUri( imAccountUri );
- res.setProperty( NCO::imNickname(), alias );
- res.setProperty( NAO::prefLabel(), alias );
-
- fireGraphTimer();
+ // imNickName does not have a max cardinality of 1
+ // so we cannot use to storeResources, as it will just add another value
+ KJob* job = Nepomuk::setProperty( QList<QUrl>() << imAccountUri, NCO::imNickname(),
+ QVariantList() << alias );
+ connect( job, SIGNAL(finished(KJob*)), this, SLOT(onSaveJobResult(KJob*)) );
}
void NepomukStorage::setContactPresence(const QString &path,
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list