diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 0bfb4e8631d1f..425918e74e506 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -896,7 +896,7 @@ void FolderStatusModel::slotUpdateFolderState(Folder *folder) if (!folder) { return; } - + for (auto i = 0; i < _folders.count(); ++i) { if (_folders.at(i)._folder == folder) { emit dataChanged(index(i), index(i)); @@ -1105,7 +1105,7 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress) const auto totalSize = qMax(completedSize, progress.totalSize()); QString overallSyncString; - if (totalSize > 0) { + if (totalSize > 0 && completedSize > 0) { const auto completedSizeString = Utility::octetsToString(completedSize); const auto totalSizeString = Utility::octetsToString(totalSize); @@ -1134,7 +1134,7 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress) .arg(currentFile) .arg(totalFileCount); } - } else if (totalFileCount > 0) { + } else if (totalFileCount > 0 && currentFile > 0) { // Don't attempt to estimate the time left if there is no kb to transfer. overallSyncString = tr("file %1 of %2").arg(currentFile).arg(totalFileCount); }