[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:20 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=9e3e13b
The following commit has been merged in the master branch:
commit 9e3e13b87e43a2cfed31358290b96d4b4378c356
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Wed Jul 27 11:19:21 2011 +0100
Replace monitoring of connectionStatusChanged with connectionChanged as these are not always directly in sync.
This prevents a potential crash using Account::connection() when it doesn't exist.
---
kpeople/nepomuk-feeder/account.cpp | 18 +++++-------------
kpeople/nepomuk-feeder/account.h | 4 +++-
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/kpeople/nepomuk-feeder/account.cpp b/kpeople/nepomuk-feeder/account.cpp
index 79d5ec6..584a4e2 100644
--- a/kpeople/nepomuk-feeder/account.cpp
+++ b/kpeople/nepomuk-feeder/account.cpp
@@ -53,8 +53,8 @@ void Account::init()
// SLOT(onAvatarChanged(Tp::Avatar)));
// ...... and any other properties we want to sync...
connect(m_account.data(),
- SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)),
- SLOT(onConnectionStatusChanged(Tp::ConnectionStatus)));
+ SIGNAL(connectionChanged(Tp::ConnectionPtr)),
+ SLOT(onConnectionChanged(Tp::ConnectionPtr)));
// Emit a signal to notify the storage that a new account has been constructed
// FIXME: Some IM Accounts don't have an ID as such, e.g. Link-Local-XMPP.
@@ -67,7 +67,7 @@ void Account::init()
onNicknameChanged(m_account->nickname());
// Now that the storage stuff is done, simulate emission of all the account signals.
- onConnectionStatusChanged(m_account->connectionStatus());
+ onConnectionChanged(m_account->connection());
}
Account::~Account()
@@ -88,17 +88,9 @@ void Account::shutdown()
emit accountDestroyed(m_account->objectPath());
}
-void Account::onConnectionStatusChanged(Tp::ConnectionStatus status)
+void Account::onConnectionChanged(Tp::ConnectionPtr connection)
{
- if (status == Tp::ConnectionStatusConnected) {
- // We now have a connection to the account. Get the connection ready to use.
- if (!m_connection.isNull()) {
- kWarning() << "Connection should be null, but is not :/ Do nowt.";
- return;
- }
-
- kDebug() << "Connection up:" << this;
-
+ if (! connection.isNull()) {
m_connection = m_account->connection();
if (!m_connection->contactManager()) {
diff --git a/kpeople/nepomuk-feeder/account.h b/kpeople/nepomuk-feeder/account.h
index 265fb86..e8e41b5 100644
--- a/kpeople/nepomuk-feeder/account.h
+++ b/kpeople/nepomuk-feeder/account.h
@@ -67,7 +67,7 @@ Q_SIGNALS:
void contactAvatarChanged(const QString &path, const QString &id, const Tp::AvatarData &avatar);
private Q_SLOTS:
- void onConnectionStatusChanged(Tp::ConnectionStatus status);
+ void onConnectionChanged(Tp::ConnectionPtr connection);
void onNicknameChanged(const QString &nickname);
void onCurrentPresenceChanged(const Tp::Presence &presence);
void onAllKnownContactsChanged(const Tp::Contacts &added, const Tp::Contacts &removed);
@@ -87,6 +87,8 @@ private Q_SLOTS:
private:
Q_DISABLE_COPY(Account);
+ void loadContacts();
+
Tp::AccountPtr m_account;
Tp::ConnectionPtr m_connection;
QHash< Tp::ContactPtr, Contact* > m_contacts;
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list