[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:43 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=e710911
The following commit has been merged in the master branch:
commit e710911b8353dc4911a04577403ed64ae72310c0
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Thu Dec 15 11:10:38 2011 +0100
Use KPresence in GlobalPresence
REVIEW: 103406
---
KTelepathy/global-presence.cpp | 14 ++++++--------
KTelepathy/global-presence.h | 15 ++++++++-------
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/KTelepathy/global-presence.cpp b/KTelepathy/global-presence.cpp
index 6d14d02..4fe4407 100644
--- a/KTelepathy/global-presence.cpp
+++ b/KTelepathy/global-presence.cpp
@@ -32,8 +32,8 @@ namespace KTp
GlobalPresence::GlobalPresence(QObject *parent)
: QObject(parent),
- m_requestedPresence(Tp::Presence::offline()),
- m_currentPresence(Tp::Presence::offline()),
+ m_requestedPresence(Presence(Tp::Presence::offline())),
+ m_currentPresence(Presence(Tp::Presence::offline())),
m_changingPresence(false)
{
}
@@ -59,12 +59,12 @@ void GlobalPresence::setAccountManager(const Tp::AccountManagerPtr &accountManag
}
-Tp::Presence GlobalPresence::currentPresence() const
+Presence GlobalPresence::currentPresence() const
{
return m_currentPresence;
}
-Tp::Presence GlobalPresence::requestedPresence() const
+Presence GlobalPresence::requestedPresence() const
{
return m_requestedPresence;
}
@@ -74,7 +74,6 @@ bool GlobalPresence::isChangingPresence() const
return m_changingPresence;
}
-
void GlobalPresence::setPresence(const Tp::Presence &presence)
{
Q_FOREACH(const Tp::AccountPtr &account, m_enabledAccounts->accounts()) {
@@ -82,7 +81,6 @@ void GlobalPresence::setPresence(const Tp::Presence &presence)
}
}
-
void GlobalPresence::onAccountAdded(const Tp::AccountPtr &account)
{
connect(account.data(), SIGNAL(changingPresence(bool)), SLOT(onChangingPresence()));
@@ -105,7 +103,7 @@ void GlobalPresence::onCurrentPresenceChanged()
highestCurrentPresence.status() != m_currentPresence.status() ||
highestCurrentPresence.statusMessage() != m_currentPresence.statusMessage()) {
- m_currentPresence = highestCurrentPresence;
+ m_currentPresence = Presence(highestCurrentPresence);
Q_EMIT currentPresenceChanged(m_currentPresence);
}
}
@@ -121,7 +119,7 @@ void GlobalPresence::onRequestedPresenceChanged()
if (highestRequestedPresence.type() != m_requestedPresence.type() &&
highestRequestedPresence.status() != m_requestedPresence.status()) {
- m_requestedPresence = highestRequestedPresence;
+ m_requestedPresence = Presence(highestRequestedPresence);
Q_EMIT requestedPresenceChanged(m_requestedPresence);
}
}
diff --git a/KTelepathy/global-presence.h b/KTelepathy/global-presence.h
index b7d7106..194f8cc 100644
--- a/KTelepathy/global-presence.h
+++ b/KTelepathy/global-presence.h
@@ -26,6 +26,7 @@
#include <TelepathyQt/AccountSet>
#include <KTelepathy/ktelepathy-export.h>
+#include "presence.h"
namespace KTp
{
@@ -47,11 +48,11 @@ public:
/** The most online presence of any account*/
- Tp::Presence currentPresence() const;
+ Presence currentPresence() const;
/** The most online presence requested for any account if any of the accounts are changing state.
otherwise returns current presence*/
- Tp::Presence requestedPresence() const;
+ Presence requestedPresence() const;
/** Returns true if any account is changing state (i.e connecting*/
bool isChangingPresence() const;
@@ -62,8 +63,8 @@ public:
Tp::AccountSetPtr onlineAccounts() const;
Q_SIGNALS:
- void requestedPresenceChanged(const Tp::Presence &customPresence);
- void currentPresenceChanged(const Tp::Presence &presence);
+ void requestedPresenceChanged(const KTp::Presence &customPresence);
+ void currentPresenceChanged(const KTp::Presence &presence);
void changingPresence(bool isChanging);
public Q_SLOTS:
@@ -87,11 +88,11 @@ private:
Tp::AccountSetPtr m_onlineAccounts;
/**Saved presence for later restoration (for example after returning from auto-away) */
- Tp::Presence m_savedPresence;
+ KTp::Presence m_savedPresence;
/** A cache of the last sent requested presence, to avoid resignalling*/
- Tp::Presence m_requestedPresence;
+ KTp::Presence m_requestedPresence;
/** A cache of the last sent presence*/
- Tp::Presence m_currentPresence;
+ KTp::Presence m_currentPresence;
bool m_changingPresence;
};
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list