[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:06:14 UTC 2016


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

The following commit has been merged in the master branch:
commit bbb2f598119dd943bb6c639de07274c834747f28
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Wed Jan 16 01:11:46 2013 +0000

    Correctly namespace AccountsListModel
---
 KTp/Models/accounts-list-model.cpp | 30 +++++++++++++++---------------
 KTp/Models/accounts-list-model.h   |  9 +++++++--
 2 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index 4437694..c4fb917 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -32,7 +32,7 @@
 #include <TelepathyQt/Account>
 #include <TelepathyQt/AccountSet>
 
-class AccountsListModel::Private {
+class KTp::AccountsListModel::Private {
 public:
     QList<Tp::AccountPtr> accounts;
     Tp::AccountSetPtr accountSet;
@@ -40,17 +40,17 @@ public:
 };
 
 
-AccountsListModel::AccountsListModel(QObject *parent)
+KTp::AccountsListModel::AccountsListModel(QObject *parent)
  : QAbstractListModel(parent),
    d(new AccountsListModel::Private)
 {
 }
 
-AccountsListModel::~AccountsListModel()
+KTp::AccountsListModel::~AccountsListModel()
 {
 }
 
-void AccountsListModel::setAccountSet(const Tp::AccountSetPtr &accountSet)
+void KTp::AccountsListModel::setAccountSet(const Tp::AccountSetPtr &accountSet)
 {
     beginResetModel();
     d->accounts.clear();
@@ -65,7 +65,7 @@ void AccountsListModel::setAccountSet(const Tp::AccountSetPtr &accountSet)
 
 }
 
-int AccountsListModel::rowCount(const QModelIndex & parent) const
+int KTp::AccountsListModel::rowCount(const QModelIndex & parent) const
 {
     // If the index is the root item, then return the row count.
     if (parent == QModelIndex()) {
@@ -77,7 +77,7 @@ int AccountsListModel::rowCount(const QModelIndex & parent) const
     return 0;
 }
 
-int AccountsListModel::columnCount(const QModelIndex& parent) const
+int KTp::AccountsListModel::columnCount(const QModelIndex& parent) const
 {
     Q_UNUSED(parent);
 
@@ -86,7 +86,7 @@ int AccountsListModel::columnCount(const QModelIndex& parent) const
 }
 
 
-QVariant AccountsListModel::data(const QModelIndex &index, int role) const
+QVariant KTp::AccountsListModel::data(const QModelIndex &index, int role) const
 {
     if (!index.isValid()) {
         return QVariant();
@@ -143,7 +143,7 @@ QVariant AccountsListModel::data(const QModelIndex &index, int role) const
     return data;
 }
 
-bool AccountsListModel::setData(const QModelIndex &index, const QVariant &value, int role)
+bool KTp::AccountsListModel::setData(const QModelIndex &index, const QVariant &value, int role)
 {
     if (!index.isValid()) {
         return false;
@@ -157,7 +157,7 @@ bool AccountsListModel::setData(const QModelIndex &index, const QVariant &value,
     return false;
 }
 
-QModelIndex AccountsListModel::index(int row, int column, const QModelIndex& parent) const
+QModelIndex KTp::AccountsListModel::index(int row, int column, const QModelIndex& parent) const
 {
     if (row < 0 || column < 0 || parent != QModelIndex()) {
         return QModelIndex();
@@ -170,7 +170,7 @@ QModelIndex AccountsListModel::index(int row, int column, const QModelIndex& par
     return QModelIndex();
 }
 
-void AccountsListModel::onAccountAdded(const Tp::AccountPtr &account)
+void KTp::AccountsListModel::onAccountAdded(const Tp::AccountPtr &account)
 {
     kDebug() << "Creating a new Account from account:" << account.data();
 
@@ -219,14 +219,14 @@ void AccountsListModel::onAccountAdded(const Tp::AccountPtr &account)
     }
 }
 
-void AccountsListModel::onAccountRemoved(const Tp::AccountPtr &account)
+void KTp::AccountsListModel::onAccountRemoved(const Tp::AccountPtr &account)
 {
     beginRemoveRows(QModelIndex(), d->accounts.indexOf(account), d->accounts.indexOf(account));
     d->accounts.removeAll(account);
     endRemoveRows();
 }
 
-void AccountsListModel::onAccountUpdated()
+void KTp::AccountsListModel::onAccountUpdated()
 {
     Tp::AccountPtr item = Tp::AccountPtr(qobject_cast<Tp::Account*>(sender()));
 
@@ -240,7 +240,7 @@ void AccountsListModel::onAccountUpdated()
     Q_EMIT dataChanged(index, index);
 }
 
-const QString AccountsListModel::connectionStateString(const Tp::AccountPtr &account) const
+const QString KTp::AccountsListModel::connectionStateString(const Tp::AccountPtr &account) const
 {
     if (account->isEnabled()) {
         switch (account->connectionStatus()) {
@@ -258,7 +258,7 @@ const QString AccountsListModel::connectionStateString(const Tp::AccountPtr &acc
     }
 }
 
-const KIcon AccountsListModel::connectionStateIcon(const Tp::AccountPtr &account) const
+const KIcon KTp::AccountsListModel::connectionStateIcon(const Tp::AccountPtr &account) const
 {
     if (account->isEnabled()) {
         switch (account->connectionStatus()) {
@@ -277,7 +277,7 @@ const KIcon AccountsListModel::connectionStateIcon(const Tp::AccountPtr &account
     }
 }
 
-const QString AccountsListModel::connectionStatusReason(const Tp::AccountPtr &account) const
+const QString KTp::AccountsListModel::connectionStatusReason(const Tp::AccountPtr &account) const
 {
     if (account->connectionStatusReason() == Tp::ConnectionStatusReasonRequested) {
         return QString();
diff --git a/KTp/Models/accounts-list-model.h b/KTp/Models/accounts-list-model.h
index 62b89db..15619e5 100644
--- a/KTp/Models/accounts-list-model.h
+++ b/KTp/Models/accounts-list-model.h
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef TELEPATHY_ACCOUNTS_LIST_MODEL_H
-#define TELEPATHY_ACCOUNTS_LIST_MODEL_H
+#ifndef KTP_ACCOUNTS_LIST_MODEL_H
+#define KTP_ACCOUNTS_LIST_MODEL_H
 
 #include <QtCore/QAbstractListModel>
 
@@ -30,6 +30,9 @@
 
 class KIcon;
 
+namespace KTp
+{
+
 class KTP_EXPORT AccountsListModel : public QAbstractListModel
 {
     Q_OBJECT
@@ -71,6 +74,8 @@ private:
     const QString connectionStatusReason(const Tp::AccountPtr &account) const;
 };
 
+}
+
 Q_DECLARE_METATYPE(Tp::AccountPtr)
 
 #endif // header guard

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list