Merge pull request #8759 from mike0609king/issue8704

fix(folderstatusmodel): 32 bit int overflow in current item progress fixed
This commit is contained in:
Matthieu Gallien 2025-09-17 14:39:57 +02:00 committed by GitHub
commit 28347fe650
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1017,10 +1017,10 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
// find the single item to display: This is going to be the bigger item, or the last completed
// item if no items are in progress.
auto curItem = progress._lastCompletedItem;
auto curItemProgress = -1; // -1 means finished
auto biggerItemSize = 0;
auto estimatedUpBw = 0;
auto estimatedDownBw = 0;
qint64 curItemProgress = -1; // -1 means finished
qint64 biggerItemSize = 0;
qint64 estimatedUpBw = 0;
qint64 estimatedDownBw = 0;
QStringList filenamesList;
for (const auto &syncFile : progress._currentItems) {
if (curItemProgress == -1 || (ProgressInfo::isSizeDependent(syncFile._item)