[Pkg-owncloud-commits] [owncloud-client] 86/218: Units: Back to the "usual" mix units.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 17 14:30:49 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 995b42d0fc31bee5882b2f6a704400f4f221c192
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Sep 10 12:08:20 2015 +0200

    Units: Back to the "usual" mix units.
    
    Now we display units again numerically wrong (based on 1024) but back
    to how it was before in ownCloud.
---
 src/libsync/utility.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/libsync/utility.cpp b/src/libsync/utility.cpp
index 5babf16..98dc63d 100644
--- a/src/libsync/utility.cpp
+++ b/src/libsync/utility.cpp
@@ -103,10 +103,11 @@ void Utility::setupFavLink(const QString &folder)
 
 QString Utility::octetsToString( qint64 octets )
 {
-    static const qint64 kb = 1000;
-    static const qint64 mb = 1000 * kb;
-    static const qint64 gb = 1000 * mb;
-    static const qint64 tb = 1000 * gb;
+#define THE_FACTOR 1024
+    static const qint64 kb = THE_FACTOR;
+    static const qint64 mb = THE_FACTOR * kb;
+    static const qint64 gb = THE_FACTOR * mb;
+    static const qint64 tb = THE_FACTOR * gb;
 
     QString s;
     qreal value = octets;

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