node = info.mid(pos + 1);
copyFile(index, relPath, node);
qint64 now = QDateTime::currentMSecsSinceEpoch();
- qint64 estimated = (now - start) * m_hotBytes / max(1LL, m_processedBytes);
+ qint64 estimated = qint64(double(now - start) / max(1LL, m_processedBytes) * m_hotBytes);
m_mainWindow->externalAppend(ReGuiQueueItem::StatusLine, NULL,
tr("%1 of %2 (%3 of %4) %5 MB/sec Remaining: %6 of %7")
.arg(m_processedFiles).arg(m_hotFiles)
m_mutex.unlock();
now = QDateTime::currentMSecsSinceEpoch();
qint64 duration = (now - start);
- qint64 estimated = qint64 ((double) duration * (double) hotBytes * 2.0
- / (double) max(1LL, processedBytes));
+ qint64 estimated = estimated = qint64(double(now - start) / max(1LL, m_processedBytes) * m_hotBytes * 2);
qint64 rest = estimated - duration;
m_mainWindow->externalAppend(ReGuiQueueItem::StatusLine, NULL,
tr("%1 of %2 (%3 of %4) %5 MB/sec Remaining: %6 of %7")