[Pkg-owncloud-commits] [owncloud-client] 256/498: FolderStatusModel: uses int64 for the sizes to prevent overflow
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:55 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 68668e25bd0f5e831ce3b5f3b72227c17c525070
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Jul 8 14:52:58 2015 +0200
FolderStatusModel: uses int64 for the sizes to prevent overflow
Issue #3420
(The change in Utility just make sure never to use the scientific notation,
even if it should never happen)
---
src/gui/folderstatusmodel.h | 2 +-
src/libsync/utility.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h
index d1b9c7d..4b3e394 100644
--- a/src/gui/folderstatusmodel.h
+++ b/src/gui/folderstatusmodel.h
@@ -59,7 +59,7 @@ public:
QString _path;
QVector<int> _pathIdx;
QVector<SubFolderInfo> _subs;
- int _size;
+ qint64 _size;
bool _fetched; // If we did the LSCOL for this folder already
bool _fetching;
bool _isUndecided; // undecided folder are the big folder that the user has not accepted yet
diff --git a/src/libsync/utility.cpp b/src/libsync/utility.cpp
index 3976728..3feefcb 100644
--- a/src/libsync/utility.cpp
+++ b/src/libsync/utility.cpp
@@ -126,7 +126,7 @@ QString Utility::octetsToString( qint64 octets )
s = QCoreApplication::translate("Utility", "%L1 B");
}
- return (value > 9.95) ? s.arg(qRound(value)) : s.arg(value, 0, 'g', 2);
+ return (value > 9.95) ? s.arg(qRound(value)) : s.arg(value, 0, 'f', 2);
}
// Qtified version of get_platforms() in csync_owncloud.c
--
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