[Pkg-owncloud-commits] [owncloud-client] 232/470: Cleaups based on review feedback.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit cacb751ab873e05091af7650bf4d6d93bd86924a
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Tue Mar 29 14:38:11 2016 +0200

    Cleaups based on review feedback.
---
 src/gui/activitylistmodel.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gui/activitylistmodel.cpp b/src/gui/activitylistmodel.cpp
index 07e0ba3..ac27db1 100644
--- a/src/gui/activitylistmodel.cpp
+++ b/src/gui/activitylistmodel.cpp
@@ -99,8 +99,7 @@ bool ActivityListModel::canFetchMore(const QModelIndex& ) const
 {
     if( _activityLists.count() == 0 ) return true;
 
-    QMap<AccountState*, ActivityList>::const_iterator i = _activityLists.begin();
-    while (i != _activityLists.end()) {
+    for(auto i = _activityLists.begin() ; i != _activityLists.end(); ++i) {
         AccountState *ast = i.key();
         if( ast && ast->isConnected() ) {
             ActivityList activities = i.value();
@@ -176,9 +175,9 @@ void ActivityListModel::combineActivityLists()
 
     std::sort( resultList.begin(), resultList.end() );
 
-    beginRemoveRows(QModelIndex(), 0, _finalList.count() );
+    beginResetModel();
     _finalList.clear();
-    endRemoveRows();
+    endResetModel();
 
     beginInsertRows(QModelIndex(), 0, resultList.count());
     _finalList = resultList;
@@ -189,7 +188,7 @@ void ActivityListModel::fetchMore(const QModelIndex &)
 {
     QList<AccountStatePtr> accounts = AccountManager::instance()->accounts();
 
-    foreach (AccountStatePtr asp, accounts) {
+    foreach (const AccountStatePtr& asp, accounts) {
 
         if( !_activityLists.contains(asp.data()) && asp->isConnected() ) {
             _activityLists[asp.data()] = ActivityList();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list