[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:05:50 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=a20f6e0
The following commit has been merged in the master branch:
commit a20f6e0b681cf2f26600bc4e0d728ed9c50e7443
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Fri Nov 9 15:16:06 2012 +0900
Address review comments
---
KTp/Models/accounts-list-model.cpp | 8 +++++---
KTp/Models/accounts-list-model.h | 7 ++++---
KTp/Models/accounts-model-item.cpp | 2 +-
KTp/Models/groups-model.h | 2 +-
4 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index dcf6a73..8453fc3 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -1,7 +1,8 @@
/*
- * This file is part of telepathy-accounts-kcm
+ * This file is part of ktp-common-internals
*
* Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
+ * Copyright (C) 2012 David Edmundson <kde at davidedmundson.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,6 +27,7 @@
#include <KPixmapSequence>
#include <KTp/error-dictionary.h>
+#include <KTp/presence.h>
#include <TelepathyQt/Account>
#include <TelepathyQt/AccountManager>
@@ -253,7 +255,7 @@ const QString AccountsListModel::connectionStateString(const Tp::AccountPtr &acc
if (account->isEnabled()) {
switch (account->connectionStatus()) {
case Tp::ConnectionStatusConnected:
- return i18n("Online");
+ return KTp::Presence(account->currentPresence()).displayString();
case Tp::ConnectionStatusConnecting:
return i18nc("This is a connection state", "Connecting");
case Tp::ConnectionStatusDisconnected:
@@ -271,7 +273,7 @@ const KIcon AccountsListModel::connectionStateIcon(const Tp::AccountPtr &account
if (account->isEnabled()) {
switch (account->connectionStatus()) {
case Tp::ConnectionStatusConnected:
- return KIcon(QLatin1String("user-online"));
+ return KTp::Presence(account->currentPresence()).icon();
case Tp::ConnectionStatusConnecting:
//imho this is not really worth animating, but feel free to play around..
return KIcon(KPixmapSequence(QLatin1String("process-working"), 22).frameAt(0));
diff --git a/KTp/Models/accounts-list-model.h b/KTp/Models/accounts-list-model.h
index 8548f3a..365a522 100644
--- a/KTp/Models/accounts-list-model.h
+++ b/KTp/Models/accounts-list-model.h
@@ -1,7 +1,8 @@
/*
- * This file is part of telepathy-accounts-kcm
+ * This file is part of ktp-common-internals
*
* Copyright (C) 2009 Collabora Ltd. <info at collabora.com>
+ * Copyright (C) 2012 David Edmundson <kde at davidedmundson.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,8 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef TELEPATHY_ACCOUNTS_KCM_ACCOUNTS_LIST_MODEL_H
-#define TELEPATHY_ACCOUNTS_KCM_ACCOUNTS_LIST_MODEL_H
+#ifndef TELEPATHY_ACCOUNTS_LIST_MODEL_H
+#define TELEPATHY_ACCOUNTS_LIST_MODEL_H
#include <QtCore/QAbstractListModel>
diff --git a/KTp/Models/accounts-model-item.cpp b/KTp/Models/accounts-model-item.cpp
index bdd7500..67e6626 100644
--- a/KTp/Models/accounts-model-item.cpp
+++ b/KTp/Models/accounts-model-item.cpp
@@ -144,7 +144,7 @@ QVariant AccountsModelItem::data(int role) const
case ContactsModel::IdRole:
return mPriv->mAccount->uniqueIdentifier();
case ContactsModel::TypeRole:
- return ContactsModel::ContactRowType;
+ return ContactsModel::AccountRowType;
case ContactsModel::AccountRole:
return QVariant::fromValue(mPriv->mAccount);
case ContactsModel::AvatarRole:
diff --git a/KTp/Models/groups-model.h b/KTp/Models/groups-model.h
index 7974ced..a070766 100644
--- a/KTp/Models/groups-model.h
+++ b/KTp/Models/groups-model.h
@@ -51,7 +51,7 @@ public:
GroupNameRole = Qt::UserRole + 1000
};
- explicit GroupsModel(ContactsModel* am, QObject* parent = 0);
+ explicit GroupsModel(ContactsModel *am, QObject* parent = 0);
virtual ~GroupsModel();
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list