node = info.mid(pos + 1);
copyFile(index, relPath, node);
if (m_verboseLevel > VerboseQuiet){
- qint64 duration = QDateTime::currentMSecsSinceEpoch() - start.currentMSecsSinceEpoch();
- double factor = double(m_hotBytes) / max(1LL, m_processedBytes);
+ qint64 duration = QDateTime::currentMSecsSinceEpoch() - start.toMSecsSinceEpoch();
+ double factor = double(m_processedBytes) / max(1LL, m_hotBytes);
m_mainWindow->externalAppend(ReGuiQueueItem::StatusLine, NULL,
tr("%1 of %2 (%3 of %4) %5 MB/sec runtime: %6")
.arg(m_processedFiles).arg(m_hotFiles)
}
m_mainWindow->externalTaskFinished(tr("backup complete after %1. Errors: %2")
.arg(ReQStringUtils::readableDuration(
- QDateTime::currentMSecsSinceEpoch() - start.currentMSecsSinceEpoch()))
+ QDateTime::currentMSecsSinceEpoch() - start.toMSecsSinceEpoch()))
.arg(m_mainWindow->errors()));
}
error(QObject::tr("checksum differs: ") + relPath + node
+ " [" + sourceChecksum + "/" + checksum + "]");
}
- qint64 processedBytes, hotBytes;
- int hotFiles, processedFiles;
- m_mutex.lock();
- hotFiles = m_hotFiles;
- hotBytes = m_hotBytes;
- processedBytes = m_processedBytes;
- processedFiles = m_processedFiles;
- m_mutex.unlock();
if (m_verboseLevel > VerboseQuiet){
- now = QDateTime::currentMSecsSinceEpoch();
- qint64 duration = (now - start.currentMSecsSinceEpoch());
- double factor = double(m_hotBytes) * 2 / max(1LL, m_processedBytes);
+ qint64 processedBytes, hotBytes;
+ int hotFiles, processedFiles;
+ m_mutex.lock();
+ hotFiles = m_hotFiles;
+ hotBytes = m_hotBytes;
+ processedBytes = m_processedBytes;
+ processedFiles = m_processedFiles;
+ m_mutex.unlock();
+ now = QDateTime::currentMSecsSinceEpoch();
+ qint64 duration = (now - start.toMSecsSinceEpoch());
+ double factor = m_processedBytes / double(max(1LL, m_hotBytes * 2));
m_mainWindow->externalAppend(ReGuiQueueItem::StatusLine, NULL,
tr("%1 of %2 (%3 of %4) %5 MB/sec runtime: %6")
.arg(processedFiles).arg(hotFiles * 2)
}
now = QDateTime::currentMSecsSinceEpoch();
m_mainWindow->externalTaskFinished(tr("Building target checksums complete after %1. Processed: %2 Errors: %3")
- .arg(ReQStringUtils::readableDuration(now - start.currentMSecsSinceEpoch()))
+ .arg(ReQStringUtils::readableDuration(now - start.toMSecsSinceEpoch()))
.arg(count)
.arg(m_mainWindow->errors()));
}
break;
}
if (m_verboseLevel > VerboseQuiet){
- double factor = double(m_hotFiles) / max(1, m_processedFiles);
- qint64 duration = QDateTime::currentMSecsSinceEpoch() - start.currentMSecsSinceEpoch();
+ double factor = double(m_processedFiles) / max(1, m_hotFiles);
+ qint64 duration = QDateTime::currentMSecsSinceEpoch() - start.toMSecsSinceEpoch();
m_mainWindow->externalAppend(ReGuiQueueItem::StatusLine, NULL,
tr("%1 of %2 (%3 of %4) %5 MB/sec runtime: %6")
.arg(m_processedFiles)
}
m_mainWindow->externalTaskFinished(tr("backup complete after %1. Errors: %2")
.arg(ReQStringUtils::readableDuration(
- QDateTime::currentMSecsSinceEpoch() - start.currentMSecsSinceEpoch()))
+ QDateTime::currentMSecsSinceEpoch() - start.toMSecsSinceEpoch()))
.arg(m_mainWindow->errors()));
}
m_mutex.unlock();
} else {
qint64 diff = 0;
- bool doCopy = false;
+ bool doTransfer = false;
if (! m_compareWithTarget)
- doCopy = true;
+ doTransfer = true;
else if (target.isEmpty())
- doCopy = true;
+ doTransfer = true;
else {
QFileInfo trg(target + it.fileName());
if (! trg.exists())
- doCopy = true;
+ doTransfer = true;
else {
const QFileInfo src = it.fileInfo();
if (trg.size() != src.size())
- doCopy = true;
+ doTransfer = true;
else if ((diff = src.lastModified().toMSecsSinceEpoch()
- trg.lastModified().toMSecsSinceEpoch()) > 2000)
- doCopy = true;
+ doTransfer = true;
}
}
- if (doCopy){
+ if (doTransfer){
info = prefix + it.fileName();
}
m_mutex.lock();
- if (doCopy){
+ if (doTransfer){
m_files.append(info);
m_hotFiles++;
m_hotBytes += it.fileInfo().size();