[Pkg-owncloud-commits] [owncloud-client] 104/484: Account Settings: Fix crash for acocunts withour folder

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:21 UTC 2015


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 374f29c4d32949c7caf6f9cc0ec6de792682165a
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Oct 19 18:08:11 2015 +0200

    Account Settings: Fix crash for acocunts withour folder
    
    Was broken by  027a865fbc1dbee52bb100e488c869383b1e92df
---
 src/gui/accountsettings.cpp | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 2ef99f2..8324de9 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -519,18 +519,13 @@ AccountSettings::~AccountSettings()
 
 void AccountSettings::refreshSelectiveSyncStatus()
 {
-    if (_model->_folders.first()._subs.count() == 0) {
-        // Don't show when there is no items in model yet.
-        // It will be called again via rowsInserted()
-        ui->selectiveSyncStatus->setVisible(false);
-        return;
-    }
-
     bool shouldBeVisible = _model->isDirty();
     QStringList undecidedFolder;
     for (int i = 0; !shouldBeVisible && i < _model->rowCount(); ++i) {
-        if (ui->_folderList->isExpanded(_model->index(i)))
+        auto index = _model->index(i);
+        if (ui->_folderList->isExpanded(index) && _model->rowCount(index) > 0) {
             shouldBeVisible = true;
+        }
     }
 
     foreach (Folder *folder, FolderMan::instance()->map().values()) {

-- 
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