[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:08:16 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=e5e3690
The following commit has been merged in the master branch:
commit e5e3690bf8a5d063d921e0207415bbc8b63d6b78
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Thu Dec 15 11:12:25 2011 +0100
Use KTp::Presence
---
global-presence-chooser.cpp | 10 +++++-----
global-presence-chooser.h | 3 ++-
presence-model.cpp | 6 +++---
presence-model.h | 6 +++---
4 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 6f8117e..bd66363 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -107,7 +107,7 @@ QVariant PresenceModelExtended::data(const QModelIndex &index, int role) const
case Qt::DecorationRole:
return m_temporaryPresence.icon();
case PresenceModel::PresenceRole:
- return QVariant::fromValue<Tp::Presence>(m_temporaryPresence);
+ return QVariant::fromValue<KTp::Presence>(m_temporaryPresence);
}
}
else {
@@ -177,7 +177,7 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
m_busyOverlay->setWidget(this);
connect(this, SIGNAL(activated(int)), SLOT(onCurrentIndexChanged(int)));
- connect(m_globalPresence, SIGNAL(currentPresenceChanged(Tp::Presence)), SLOT(onPresenceChanged(Tp::Presence)));
+ connect(m_globalPresence, SIGNAL(currentPresenceChanged(KTp::Presence)), SLOT(onPresenceChanged(KTp::Presence)));
connect(m_globalPresence, SIGNAL(changingPresence(bool)), SLOT(onPresenceChanging(bool)));
onPresenceChanged(m_globalPresence->currentPresence());
@@ -339,17 +339,17 @@ void GlobalPresenceChooser::onCurrentIndexChanged(int index)
QLatin1String( "org.kde.Telepathy"),
QLatin1String("deactivateNowPlaying"));
QDBusConnection::sessionBus().send(message);
- Tp::Presence presence = itemData(index, PresenceModel::PresenceRole).value<Tp::Presence>();
+ KTp::Presence presence = itemData(index, PresenceModel::PresenceRole).value<KTp::Presence>();
m_globalPresence->setPresence(presence);
}
}
-void GlobalPresenceChooser::onPresenceChanged(const Tp::Presence &presence)
+void GlobalPresenceChooser::onPresenceChanged(const KTp::Presence &presence)
{
m_modelExtended->removeTemporaryPresence();
kDebug();
for (int i=0; i < count() ; i++) {
- Tp::Presence itemPresence = itemData(i, PresenceModel::PresenceRole).value<Tp::Presence>();
+ KTp::Presence itemPresence = itemData(i, PresenceModel::PresenceRole).value<KTp::Presence>();
if (itemPresence.type() == presence.type() && itemPresence.statusMessage() == presence.statusMessage()) {
setCurrentIndex(i);
return;
diff --git a/global-presence-chooser.h b/global-presence-chooser.h
index 6549aaa..69ca6a6 100644
--- a/global-presence-chooser.h
+++ b/global-presence-chooser.h
@@ -24,6 +24,7 @@
#include <KComboBox>
#include <TelepathyQt/AccountManager>
+#include <KTelepathy/presence.h>
class KPixmapSequenceOverlayPainter;
class PresenceModel;
@@ -47,7 +48,7 @@ protected:
private slots:
void onCurrentIndexChanged(int index);
- void onPresenceChanged(const Tp::Presence &presence);
+ void onPresenceChanged(const KTp::Presence &presence);
void onPresenceChanging(bool isChanging);
private:
diff --git a/presence-model.cpp b/presence-model.cpp
index 6214e03..c80320d 100644
--- a/presence-model.cpp
+++ b/presence-model.cpp
@@ -75,7 +75,7 @@ QVariant PresenceModel::data(const QModelIndex &index, int role) const
}
case PresenceModel::PresenceRole:
- return QVariant::fromValue<Tp::Presence>(presence);
+ return QVariant::fromValue<KTp::Presence>(presence);
}
@@ -122,7 +122,7 @@ void PresenceModel::loadCustomPresences()
}
}
-QModelIndex PresenceModel::addPresence(const Tp::Presence &presence)
+QModelIndex PresenceModel::addPresence(const KTp::Presence &presence)
{
if(m_presences.contains(presence)) {
return createIndex(m_presences.indexOf(presence),0);
@@ -139,7 +139,7 @@ QModelIndex PresenceModel::addPresence(const Tp::Presence &presence)
return createIndex(index, 0);
}
-void PresenceModel::removePresence(const Tp::Presence &presence)
+void PresenceModel::removePresence(const KTp::Presence &presence)
{
int row = m_presences.indexOf(presence);
beginRemoveRows(QModelIndex(), row, row);
diff --git a/presence-model.h b/presence-model.h
index 7dc3bc3..d6a03c4 100644
--- a/presence-model.h
+++ b/presence-model.h
@@ -43,12 +43,12 @@ public:
/** Adds a custom presence to the model, and write value to config file.
@return the newly added item
*/
- QModelIndex addPresence(const Tp::Presence &presence);
+ QModelIndex addPresence(const KTp::Presence &presence);
- void removePresence(const Tp::Presence &presence);
+ void removePresence(const KTp::Presence &presence);
/** Returns the index of a given presence, adding it if needed*/
- QModelIndex indexOf(const Tp::Presence &presence);
+ QModelIndex indexOf(const KTp::Presence &presence);
//protected:
virtual QVariant data(const QModelIndex &index, int role) const;
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list