[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:08:39 UTC 2016


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

The following commit has been merged in the master branch:
commit 3fbadce06d28b2b5f992d86d333f5ef66b1204c1
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Tue Feb 3 19:36:05 2015 +0100

    Make sure we never return an invalid presence
    
    Tp::Contact::presence() returns the last known presence even after the connection was invalidated (making the KTp::Contact invalidated)
---
 KTp/contact.cpp | 4 ++++
 KTp/contact.h   | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/KTp/contact.cpp b/KTp/contact.cpp
index 5341e98..1ec037b 100644
--- a/KTp/contact.cpp
+++ b/KTp/contact.cpp
@@ -61,6 +61,10 @@ QString KTp::Contact::accountUniqueIdentifier() const
 
 KTp::Presence KTp::Contact::presence() const
 {
+    if (!manager() || !manager()->connection()) {
+        return Tp::Presence::offline();
+    }
+
     return KTp::Presence(Tp::Contact::presence());
 }
 
diff --git a/KTp/contact.h b/KTp/contact.h
index dab5a55..3505765 100644
--- a/KTp/contact.h
+++ b/KTp/contact.h
@@ -72,7 +72,6 @@ private:
     QString buildAvatarPath(const QString &avatarToken);
 
     QString m_accountUniqueIdentifier;
-
 };
 
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list