[Pkg-owncloud-commits] [owncloud-client] 244/498: FolderStatusModel: Minor cleanup.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:54 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 e390c22f96cc8fb1d429118f06b3f9cfd66be801
Author: Christian Kamm <kamm at incasoftware.de>
Date: Fri Jul 3 14:28:04 2015 +0200
FolderStatusModel: Minor cleanup.
---
src/gui/folderstatusmodel.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index 0da7da8..9344c8ca 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -115,10 +115,12 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
break;
}
- auto f = _folders.at(index.row())._folder;
+ const SubFolderInfo & folderInfo = _folders.at(index.row());
+ auto f = folderInfo._folder;
if (!f)
return QVariant();
+ const SubFolderInfo::Progress & progress = folderInfo._progress;
bool accountConnected = true; // FIXME
switch (role) {
@@ -153,15 +155,15 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
return Theme::instance()->folderOfflineIcon();
}
case FolderStatusDelegate::AddProgressSpace:
- return !_folders.value(index.row())._progress.isNull();
+ return !progress.isNull();
case FolderStatusDelegate::SyncProgressItemString:
- return _folders.value(index.row())._progress._progressString;
+ return progress._progressString;
case FolderStatusDelegate::WarningCount:
- return _folders.value(index.row())._progress._warningCount;
+ return progress._warningCount;
case FolderStatusDelegate::SyncProgressOverallPercent:
- return _folders.value(index.row())._progress._overallPercent;
+ return progress._overallPercent;
case FolderStatusDelegate::SyncProgressOverallString:
- return _folders.value(index.row())._progress._overallSyncString;
+ return progress._overallSyncString;
}
return QVariant();
}
--
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