[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:25 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=96b9378
The following commit has been merged in the master branch:
commit 96b93781efb9bc3701221b064161ca33fe3408f5
Author: George Goldberg <grundleborg at googlemail.com>
Date: Thu Feb 11 21:23:02 2010 +0000
Tidy up TelepathyAccountMonitor class.
svn path=/trunk/playground/network/telepathy-integration-daemon/; revision=1088895
---
kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp | 15 +++++++++------
kpeople/nepomuk-feeder/telepathyaccountmonitor.h | 13 ++++++++++---
2 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp b/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
index 4d49f1b..a2a0e21 100644
--- a/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
+++ b/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
@@ -20,16 +20,18 @@
*/
#include "telepathyaccountmonitor.h"
-#include <Nepomuk/ResourceManager>
#include <KDebug>
+#include <Nepomuk/ResourceManager>
#include <QtCore/QString>
+
#include <TelepathyQt4/PendingReady>
TelepathyAccountMonitor::TelepathyAccountMonitor(QObject *parent)
- : QObject(parent)
+ : QObject(parent),
+ m_resourceManager(0)
{
// Create an instance of the AccountManager and start to get it ready.
m_accountManager = Tp::AccountManager::create();
@@ -38,15 +40,17 @@ TelepathyAccountMonitor::TelepathyAccountMonitor(QObject *parent)
SIGNAL(finished(Tp::PendingOperation*)),
SLOT(onAccountManagerReady(Tp::PendingOperation*)));
- Nepomuk::ResourceManager *nepomukResourceManager = Nepomuk::ResourceManager::instance();
+ // Create an instance of the Nepomuk Resource Manager, and connect to it's error signal.
+ m_resourceManager = Nepomuk::ResourceManager::instance();
- connect(nepomukResourceManager,
+ connect(m_resourceManager,
SIGNAL(error(QString, int)),
SLOT(onNepomukError(QString, int)));
}
TelepathyAccountMonitor::~TelepathyAccountMonitor()
{
+ // Don't delete the Nepomuk Resource manager. Nepomuk should take care of this itself.
}
void TelepathyAccountMonitor::onAccountManagerReady(Tp::PendingOperation *op)
@@ -54,7 +58,6 @@ void TelepathyAccountMonitor::onAccountManagerReady(Tp::PendingOperation *op)
if (op->isError()) {
kWarning() << "Account manager cannot become ready:"
<< op->errorName()
- << "-"
<< op->errorMessage();
return;
}
@@ -82,7 +85,7 @@ Tp::AccountManagerPtr TelepathyAccountMonitor::accountManager() const
void TelepathyAccountMonitor::onNepomukError(const QString &uri, int errorCode)
{
- kDebug() << "A Nepomuk Error occurred:" << uri << errorCode;
+ kWarning() << "A Nepomuk Error occurred:" << uri << errorCode;
}
diff --git a/kpeople/nepomuk-feeder/telepathyaccountmonitor.h b/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
index 5814dd7..4f8a464 100644
--- a/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
+++ b/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
@@ -24,19 +24,25 @@
#include "telepathyaccount.h"
-#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QString>
#include <TelepathyQt4/AccountManager>
+namespace Nepomuk {
+ class ResourceManager;
+}
+
namespace Tp {
class PendingOperation;
}
/**
- * Monitors the Telepathy Account Manager, ensuring that whenever an account is created, a
- * TelepathyAccount object is created to monitor it.
+ * Monitors the Telepathy Account Manager, ensuring that all existing accounts
+ * have a corresponding TelepathyAccount object within this daemon.
+ *
+ * This class is also responsible for keeping track and/or dealing with any
+ * errors that our connection to Nepomuk throws up.
*/
class TelepathyAccountMonitor : public QObject
{
@@ -57,6 +63,7 @@ private:
Q_DISABLE_COPY(TelepathyAccountMonitor);
Tp::AccountManagerPtr m_accountManager;
+ Nepomuk::ResourceManager *m_resourceManager;
};
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list