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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=8c4bd80

The following commit has been merged in the master branch:
commit 8c4bd801751bb502716b0ba8f8d76df55eeda466
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sat Jun 18 02:03:23 2011 +0100

    Renamed AccountFilterModel to AccountsFilterModel, to match accountS model
    REVIEW: 101665
    Reviewed-by: Francesco Nwokeka
---
 CMakeLists.txt                                     |  2 +-
 main-widget.cpp                                    |  4 +--
 main-widget.h                                      |  4 +--
 ...-filter-model.cpp => accounts-filter-model.cpp} | 30 +++++++++++-----------
 ...ount-filter-model.h => accounts-filter-model.h} |  9 ++++---
 5 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92ccec1..3dd8cc0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,7 +33,7 @@ set (contactlist_SRCS
      fetch-avatar-job.cpp
      dialogs/add-contact-dialog.cpp
      dialogs/remove-contact-dialog.cpp
-     models/account-filter-model.cpp
+     models/accounts-filter-model.cpp
      models/contact-model-item.cpp
      models/accounts-model-item.cpp
      models/tree-node.cpp
diff --git a/main-widget.cpp b/main-widget.cpp
index 214b22b..f19cbee 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -66,7 +66,7 @@
 #include "models/contact-model-item.h"
 #include "models/groups-model-item.h"
 #include "models/accounts-model.h"
-#include "models/account-filter-model.h"
+#include "models/accounts-filter-model.h"
 
 #define PREFERRED_TEXTCHAT_HANDLER "org.freedesktop.Telepathy.Client.KDE.TextUi"
 #define PREFERRED_FILETRANSFER_HANDLER "org.freedesktop.Telepathy.Client.KDE.FileTransfer"
@@ -293,7 +293,7 @@ void MainWidget::onAccountManagerReady(Tp::PendingOperation* op)
 
     m_model = new AccountsModel(m_accountManager, this);
     m_groupsModel = new GroupsModel(m_model, this);
-    m_modelFilter = new AccountFilterModel(this);
+    m_modelFilter = new AccountsFilterModel(this);
     if (m_groupContactsAction->isChecked()) {
         m_modelFilter->setSourceModel(m_groupsModel);
     } else {
diff --git a/main-widget.h b/main-widget.h
index fb1cf10..5625778 100644
--- a/main-widget.h
+++ b/main-widget.h
@@ -38,7 +38,7 @@ class GroupsModel;
 class KMenu;
 class KSelectAction;
 class AccountsModel;
-class AccountFilterModel;
+class AccountsFilterModel;
 class ContactDelegate;
 class FilterBar;
 class KJob;
@@ -123,7 +123,7 @@ private:
 
     AccountsModel          *m_model;
     GroupsModel            *m_groupsModel;
-    AccountFilterModel     *m_modelFilter;
+    AccountsFilterModel     *m_modelFilter;
     Tp::AccountManagerPtr   m_accountManager;
     KMenu                  *m_accountMenu;
     KMenu                  *m_avatarButtonMenu;
diff --git a/models/account-filter-model.cpp b/models/accounts-filter-model.cpp
similarity index 83%
rename from models/account-filter-model.cpp
rename to models/accounts-filter-model.cpp
index 9e511a4..24580d4 100644
--- a/models/account-filter-model.cpp
+++ b/models/accounts-filter-model.cpp
@@ -19,10 +19,10 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include "account-filter-model.h"
+#include "accounts-filter-model.h"
+
 #include "accounts-model.h"
 #include "groups-model.h"
-
 #include "groups-model-item.h"
 #include "contact-model-item.h"
 #include "accounts-model-item.h"
@@ -30,7 +30,7 @@
 
 #include <KDebug>
 
-AccountFilterModel::AccountFilterModel(QObject *parent)
+AccountsFilterModel::AccountsFilterModel(QObject *parent)
     : QSortFilterProxyModel(parent),
       m_showOfflineUsers(false),
       m_filterByName(false)
@@ -38,18 +38,18 @@ AccountFilterModel::AccountFilterModel(QObject *parent)
 
 }
 
-void AccountFilterModel::showOfflineUsers(bool showOfflineUsers)
+void AccountsFilterModel::showOfflineUsers(bool showOfflineUsers)
 {
     m_showOfflineUsers = showOfflineUsers;
     invalidateFilter();
 }
 
-bool AccountFilterModel::showOfflineUsers() const
+bool AccountsFilterModel::showOfflineUsers() const
 {
     return m_showOfflineUsers;
 }
 
-bool AccountFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
+bool AccountsFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
 {
     QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
 
@@ -69,7 +69,7 @@ bool AccountFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sour
     }
 }
 
-bool AccountFilterModel::filterAcceptsAccount(const QModelIndex &index) const
+bool AccountsFilterModel::filterAcceptsAccount(const QModelIndex &index) const
 {
     bool rowAccepted = true;
     //hide disabled accounts
@@ -84,7 +84,7 @@ bool AccountFilterModel::filterAcceptsAccount(const QModelIndex &index) const
     return rowAccepted;
 }
 
-bool AccountFilterModel::filterAcceptsContact(const QModelIndex &index) const
+bool AccountsFilterModel::filterAcceptsContact(const QModelIndex &index) const
 {
     bool rowAccepted = true;
     if (m_filterByName &&
@@ -103,7 +103,7 @@ bool AccountFilterModel::filterAcceptsContact(const QModelIndex &index) const
     return rowAccepted;
 }
 
-bool AccountFilterModel::filterAcceptsGroup(const QModelIndex &index) const
+bool AccountsFilterModel::filterAcceptsGroup(const QModelIndex &index) const
 {
     bool acceptRow = true;
     if (!m_showOfflineUsers) {
@@ -114,21 +114,21 @@ bool AccountFilterModel::filterAcceptsGroup(const QModelIndex &index) const
     return acceptRow;
 }
 
-void AccountFilterModel::setFilterString(const QString &str)
+void AccountsFilterModel::setFilterString(const QString &str)
 {
     m_filterString = str;
     m_filterByName = true;
     invalidateFilter();
 }
 
-void AccountFilterModel::clearFilterString()
+void AccountsFilterModel::clearFilterString()
 {
     m_filterString.clear();
     m_filterByName = false;
     invalidateFilter();
 }
 
-bool AccountFilterModel::lessThan( const QModelIndex &left, const QModelIndex &right ) const
+bool AccountsFilterModel::lessThan( const QModelIndex &left, const QModelIndex &right ) const
 {
         uint leftPresence;
         uint rightPresence;
@@ -160,7 +160,7 @@ bool AccountFilterModel::lessThan( const QModelIndex &left, const QModelIndex &r
         }
 }
 
-void AccountFilterModel::setSortByPresence(bool enabled)
+void AccountsFilterModel::setSortByPresence(bool enabled)
 {
     if (enabled) {
         setSortRole(AccountsModel::PresenceTypeRole);
@@ -169,10 +169,10 @@ void AccountFilterModel::setSortByPresence(bool enabled)
     }
 }
 
-bool AccountFilterModel::isSortedByPresence() const
+bool AccountsFilterModel::isSortedByPresence() const
 {
     return sortRole() == AccountsModel::PresenceTypeRole;
 }
 
 
-#include "account-filter-model.moc"
+#include "accounts-filter-model.moc"
diff --git a/models/account-filter-model.h b/models/accounts-filter-model.h
similarity index 93%
rename from models/account-filter-model.h
rename to models/accounts-filter-model.h
index e86485a..4340ad4 100644
--- a/models/account-filter-model.h
+++ b/models/accounts-filter-model.h
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef ACCOUNTFILTERMODEL_H
-#define ACCOUNTFILTERMODEL_H
+#ifndef ACCOUNTSFILTERMODEL_H
+#define ACCOUNTSFILTERMODEL_H
 
 #include <QSortFilterProxyModel>
 
@@ -36,12 +36,13 @@ class ContactModelItem;
   *     By name
   *     By presence
   */
-class AccountFilterModel : public QSortFilterProxyModel
+class AccountsFilterModel : public QSortFilterProxyModel
 {
     Q_OBJECT
 
 public:
-    AccountFilterModel(QObject *parent = 0);
+    AccountsFilterModel(QObject *parent = 0);
+    
     bool showOfflineUsers() const;
 
     /**

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list