[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:05:43 UTC 2016


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

The following commit has been merged in the master branch:
commit e6839d3b2747512ad96be30d04b64d72a9cce79a
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Fri Apr 1 17:28:56 2011 +0200

    Remove refilter() method and fix the accounts-model-item to properly emit the needed signals.
---
 account-filter-model.cpp |  7 +------
 account-filter-model.h   |  1 -
 accounts-model-item.cpp  |  2 ++
 main-widget.cpp          | 19 ++++++++-----------
 4 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/account-filter-model.cpp b/account-filter-model.cpp
index e635a22..7182362 100644
--- a/account-filter-model.cpp
+++ b/account-filter-model.cpp
@@ -90,9 +90,4 @@ void AccountFilterModel::clearFilterString()
     m_filterString.clear();
     m_filterByName = false;
     invalidateFilter();
-}
-
-void AccountFilterModel::refilter()
-{
-    invalidateFilter();
-}
+}
\ No newline at end of file
diff --git a/account-filter-model.h b/account-filter-model.h
index ba38f30..d33231d 100644
--- a/account-filter-model.h
+++ b/account-filter-model.h
@@ -35,7 +35,6 @@ public slots:
     void filterOfflineUsers(bool filterOfflineUsers);
     void setFilterString(const QString &str);
     void clearFilterString();
-    void refilter();
 
 protected:
     bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
diff --git a/accounts-model-item.cpp b/accounts-model-item.cpp
index 4217942..ad5368b 100644
--- a/accounts-model-item.cpp
+++ b/accounts-model-item.cpp
@@ -282,6 +282,8 @@ void AccountsModelItem::onContactsChanged(const Tp::Contacts &addedContacts,
 
 void AccountsModelItem::onStatusChanged(Tp::ConnectionStatus status)
 {
+    onChanged();
+
     emit connectionStatusChanged(mPriv->mAccount->uniqueIdentifier(), status);
 }
 
diff --git a/main-widget.cpp b/main-widget.cpp
index 91bc766..dc1adf2 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -223,7 +223,7 @@ void MainWidget::onAccountReady(Tp::PendingOperation* op)
     }
 
     Tp::PendingReady *pendingReady = qobject_cast<Tp::PendingReady*>(op);
-    Q_ASSERT(pendingReady);   
+    Q_ASSERT(pendingReady);
 }
 
 void MainWidget::onAccountConnectionStatusChanged(Tp::ConnectionStatus status)
@@ -235,10 +235,7 @@ void MainWidget::onAccountConnectionStatusChanged(Tp::ConnectionStatus status)
         m_contactsListView->expandAll();
         break;
     case Tp::ConnectionStatusDisconnected:
-        // This will make sure that the empty account groups will be hidden
-        m_modelFilter->refilter();
-        break;
-    //Fall through
+        //Fall through
     case Tp::ConnectionStatusConnecting:
     default:
         break;
@@ -254,7 +251,7 @@ void MainWidget::onNewAccountAdded(const Tp::AccountPtr& account)
             this, SLOT(onConnectionChanged(Tp::ConnectionPtr)));
 
     connect(account.data(),
-            SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)), 
+            SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)),
             this, SLOT(onAccountConnectionStatusChanged(Tp::ConnectionStatus)));
 
     connect(account.data(), SIGNAL(stateChanged(bool)),
@@ -284,7 +281,7 @@ void MainWidget::onAccountStateChanged(bool enabled)
     }
     else {
         findChild<AccountButton *>(account->uniqueIdentifier())->hide();
-        showMessageToUser(i18n("Account %1 was disabled!").arg(account->displayName()), 
+        showMessageToUser(i18n("Account %1 was disabled!").arg(account->displayName()),
                           MainWidget::SystemMessageError);
     }
 }
@@ -294,7 +291,7 @@ void MainWidget::onAccountRemoved()
     Tp::AccountPtr account(static_cast<Tp::Account*>(sender()));
     delete findChild<AccountButton *>(account->uniqueIdentifier());
 
-    showMessageToUser(i18n("Account %1 was removed!").arg(account->displayName()), 
+    showMessageToUser(i18n("Account %1 was removed!").arg(account->displayName()),
                       MainWidget::SystemMessageError);
 }
 
@@ -317,7 +314,7 @@ void MainWidget::onContactListDoubleClick(const QModelIndex& index)
     }
     else {
         kDebug() << "Text chat requested for index" << index;
-        startTextChannel(index);    
+        startTextChannel(index);
     }
 }
 
@@ -390,10 +387,10 @@ void MainWidget::showMessageToUser(const QString& text, const MainWidget::System
     a->setParent(msgFrame);
     a->setDuration(4000);
     a->setEasingCurve(QEasingCurve::OutExpo);
-    a->setStartValue(QPointF(m_contactsListView->viewport()->pos().x(), 
+    a->setStartValue(QPointF(m_contactsListView->viewport()->pos().x(),
                              m_contactsListView->viewport()->pos().y()+m_contactsListView->viewport()->height()));
 
-    a->setEndValue(QPointF(m_contactsListView->viewport()->pos().x(), 
+    a->setEndValue(QPointF(m_contactsListView->viewport()->pos().x(),
                            m_contactsListView->viewport()->pos().y()+m_contactsListView->viewport()->height()-50));
     a->start();
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list