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)
This commit is contained in:
Olivier Goffart 2015-07-08 14:52:58 +02:00
parent e2cb6e8086
commit 68668e25bd
2 changed files with 2 additions and 2 deletions

View file

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

View file

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