Propagator, remove the QNAM in the name as the alternative has been removed a long time ago

This commit is contained in:
Olivier Goffart 2016-05-18 16:42:55 +02:00
parent 39e93768ea
commit d2bde5489f
6 changed files with 36 additions and 36 deletions

View file

@ -201,7 +201,7 @@ bool PropagateItemJob::checkForProblemsWithShared(int httpStatusCode, const QStr
downloadItem->_instruction = CSYNC_INSTRUCTION_SYNC;
}
downloadItem->_direction = SyncFileItem::Down;
newJob = new PropagateDownloadFileQNAM(_propagator, downloadItem);
newJob = new PropagateDownloadFile(_propagator, downloadItem);
} else {
// Directories are harder to recover.
// But just re-create the directory, next sync will be able to recover the files
@ -266,11 +266,11 @@ PropagateItemJob* OwncloudPropagator::createJob(const SyncFileItemPtr &item) {
case CSYNC_INSTRUCTION_SYNC:
case CSYNC_INSTRUCTION_CONFLICT:
if (item->_direction != SyncFileItem::Up) {
auto job = new PropagateDownloadFileQNAM(this, item);
auto job = new PropagateDownloadFile(this, item);
job->setDeleteExistingFolder(deleteExisting);
return job;
} else {
auto job = new PropagateUploadFileQNAM(this, item);
auto job = new PropagateUploadFile(this, item);
job->setDeleteExisting(deleteExisting);
return job;
}

View file

@ -378,7 +378,7 @@ private:
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
// access to signals which are protected in Qt4
friend class PropagateDownloadFileQNAM;
friend class PropagateDownloadFile;
friend class PropagateUploadFileQNAM;
friend class PropagateLocalMkdir;
friend class PropagateLocalRename;

View file

@ -304,7 +304,7 @@ QString GETFileJob::errorString() const
}
}
void PropagateDownloadFileQNAM::start()
void PropagateDownloadFile::start()
{
if (_propagator->_abortRequested.fetchAndAddRelaxed(0))
return;
@ -418,7 +418,7 @@ void PropagateDownloadFileQNAM::start()
_job->start();
}
qint64 PropagateDownloadFileQNAM::committedDiskSpace() const
qint64 PropagateDownloadFile::committedDiskSpace() const
{
if (_state == Running) {
return qBound(0ULL, _item->_size - _resumeStart - _downloadProgress, _item->_size);
@ -426,13 +426,13 @@ qint64 PropagateDownloadFileQNAM::committedDiskSpace() const
return 0;
}
void PropagateDownloadFileQNAM::setDeleteExistingFolder(bool enabled)
void PropagateDownloadFile::setDeleteExistingFolder(bool enabled)
{
_deleteExisting = enabled;
}
const char owncloudCustomSoftErrorStringC[] = "owncloud-custom-soft-error-string";
void PropagateDownloadFileQNAM::slotGetFinished()
void PropagateDownloadFile::slotGetFinished()
{
_propagator->_activeJobList.removeOne(this);
@ -565,14 +565,14 @@ void PropagateDownloadFileQNAM::slotGetFinished()
validator->start(_tmpFile.fileName(), checksumHeader);
}
void PropagateDownloadFileQNAM::slotChecksumFail( const QString& errMsg )
void PropagateDownloadFile::slotChecksumFail( const QString& errMsg )
{
FileSystem::remove(_tmpFile.fileName());
_propagator->_anotherSyncNeeded = true;
done(SyncFileItem::SoftError, errMsg ); // tr("The file downloaded with a broken checksum, will be redownloaded."));
}
void PropagateDownloadFileQNAM::deleteExistingFolder()
void PropagateDownloadFile::deleteExistingFolder()
{
QString existingDir = _propagator->getFilePath(_item->_file);
if (!QFileInfo(existingDir).isDir()) {
@ -653,7 +653,7 @@ static void preserveGroupOwnership(const QString& fileName, const QFileInfo& fi)
}
} // end namespace
void PropagateDownloadFileQNAM::transmissionChecksumValidated(const QByteArray &checksumType, const QByteArray &checksum)
void PropagateDownloadFile::transmissionChecksumValidated(const QByteArray &checksumType, const QByteArray &checksum)
{
const auto theContentChecksumType = contentChecksumType();
@ -674,7 +674,7 @@ void PropagateDownloadFileQNAM::transmissionChecksumValidated(const QByteArray &
computeChecksum->start(_tmpFile.fileName());
}
void PropagateDownloadFileQNAM::contentChecksumComputed(const QByteArray &checksumType, const QByteArray &checksum)
void PropagateDownloadFile::contentChecksumComputed(const QByteArray &checksumType, const QByteArray &checksum)
{
_item->_contentChecksum = checksum;
_item->_contentChecksumType = checksumType;
@ -682,7 +682,7 @@ void PropagateDownloadFileQNAM::contentChecksumComputed(const QByteArray &checks
downloadFinished();
}
void PropagateDownloadFileQNAM::downloadFinished()
void PropagateDownloadFile::downloadFinished()
{
QString fn = _propagator->getFilePath(_item->_file);
@ -805,7 +805,7 @@ void PropagateDownloadFileQNAM::downloadFinished()
}
}
void PropagateDownloadFileQNAM::slotDownloadProgress(qint64 received, qint64)
void PropagateDownloadFile::slotDownloadProgress(qint64 received, qint64)
{
if (!_job) return;
_downloadProgress = received;
@ -813,7 +813,7 @@ void PropagateDownloadFileQNAM::slotDownloadProgress(qint64 received, qint64)
}
void PropagateDownloadFileQNAM::abort()
void PropagateDownloadFile::abort()
{
if (_job && _job->reply())
_job->reply()->abort();

View file

@ -103,13 +103,13 @@ private slots:
};
/**
* @brief The PropagateDownloadFileQNAM class
* @brief The PropagateDownloadFile class
* @ingroup libsync
*/
class PropagateDownloadFileQNAM : public PropagateItemJob {
class PropagateDownloadFile : public PropagateItemJob {
Q_OBJECT
public:
PropagateDownloadFileQNAM(OwncloudPropagator* propagator,const SyncFileItemPtr& item)
PropagateDownloadFile(OwncloudPropagator* propagator,const SyncFileItemPtr& item)
: PropagateItemJob(propagator, item), _resumeStart(0), _downloadProgress(0), _deleteExisting(false) {}
void start() Q_DECL_OVERRIDE;
qint64 committedDiskSpace() const Q_DECL_OVERRIDE;

View file

@ -184,7 +184,7 @@ bool PollJob::finished()
return true;
}
void PropagateUploadFileQNAM::start()
void PropagateUploadFile::start()
{
if (_propagator->_abortRequested.fetchAndAddRelaxed(0)) {
return;
@ -205,7 +205,7 @@ void PropagateUploadFileQNAM::start()
job->start();
}
void PropagateUploadFileQNAM::slotComputeContentChecksum()
void PropagateUploadFile::slotComputeContentChecksum()
{
if (_propagator->_abortRequested.fetchAndAddRelaxed(0)) {
return;
@ -239,12 +239,12 @@ void PropagateUploadFileQNAM::slotComputeContentChecksum()
computeChecksum->start(filePath);
}
void PropagateUploadFileQNAM::setDeleteExisting(bool enabled)
void PropagateUploadFile::setDeleteExisting(bool enabled)
{
_deleteExisting = enabled;
}
void PropagateUploadFileQNAM::slotComputeTransmissionChecksum(const QByteArray& contentChecksumType, const QByteArray& contentChecksum)
void PropagateUploadFile::slotComputeTransmissionChecksum(const QByteArray& contentChecksumType, const QByteArray& contentChecksum)
{
_item->_contentChecksum = contentChecksum;
_item->_contentChecksumType = contentChecksumType;
@ -276,7 +276,7 @@ void PropagateUploadFileQNAM::slotComputeTransmissionChecksum(const QByteArray&
computeChecksum->start(filePath);
}
void PropagateUploadFileQNAM::slotStartUpload(const QByteArray& transmissionChecksumType, const QByteArray& transmissionChecksum)
void PropagateUploadFile::slotStartUpload(const QByteArray& transmissionChecksumType, const QByteArray& transmissionChecksum)
{
// Remove ourselfs from the list of active job, before any posible call to done()
// When we start chunks, we will add it again, once for every chunks.
@ -299,7 +299,7 @@ void PropagateUploadFileQNAM::slotStartUpload(const QByteArray& transmissionChec
}
_stopWatch.addLapTime(QLatin1String("TransmissionChecksum"));
time_t prevModtime = _item->_modtime; // the _item value was set in PropagateUploadFileQNAM::start()
time_t prevModtime = _item->_modtime; // the _item value was set in PropagateUploadFile::start()
// but a potential checksum calculation could have taken some time during which the file could
// have been changed again, so better check again here.
@ -476,7 +476,7 @@ void UploadDevice::setChoked(bool b) {
}
}
void PropagateUploadFileQNAM::startNextChunk()
void PropagateUploadFile::startNextChunk()
{
if (_propagator->_abortRequested.fetchAndAddRelaxed(0))
return;
@ -607,7 +607,7 @@ void PropagateUploadFileQNAM::startNextChunk()
}
}
void PropagateUploadFileQNAM::slotPutFinished()
void PropagateUploadFile::slotPutFinished()
{
PUTFileJob *job = qobject_cast<PUTFileJob *>(sender());
Q_ASSERT(job);
@ -785,7 +785,7 @@ void PropagateUploadFileQNAM::slotPutFinished()
finalize(*_item);
}
void PropagateUploadFileQNAM::finalize(const SyncFileItem &copy)
void PropagateUploadFile::finalize(const SyncFileItem &copy)
{
// Normally, copy == _item, but when it comes from the UpdateMTimeAndETagJob, we need to do
// some updates
@ -807,7 +807,7 @@ void PropagateUploadFileQNAM::finalize(const SyncFileItem &copy)
done(SyncFileItem::Success);
}
void PropagateUploadFileQNAM::slotUploadProgress(qint64 sent, qint64 total)
void PropagateUploadFile::slotUploadProgress(qint64 sent, qint64 total)
{
// Completion is signaled with sent=0, total=0; avoid accidentally
// resetting progress due to the sent being zero by ignoring it.
@ -840,7 +840,7 @@ void PropagateUploadFileQNAM::slotUploadProgress(qint64 sent, qint64 total)
emit progress(*_item, amount);
}
void PropagateUploadFileQNAM::startPollJob(const QString& path)
void PropagateUploadFile::startPollJob(const QString& path)
{
PollJob* job = new PollJob(_propagator->account(), path, _item,
_propagator->_journal, _propagator->_localDir, this);
@ -855,7 +855,7 @@ void PropagateUploadFileQNAM::startPollJob(const QString& path)
job->start();
}
void PropagateUploadFileQNAM::slotPollFinished()
void PropagateUploadFile::slotPollFinished()
{
PollJob *job = qobject_cast<PollJob *>(sender());
Q_ASSERT(job);
@ -871,12 +871,12 @@ void PropagateUploadFileQNAM::slotPollFinished()
finalize(*job->_item);
}
void PropagateUploadFileQNAM::slotJobDestroyed(QObject* job)
void PropagateUploadFile::slotJobDestroyed(QObject* job)
{
_jobs.erase(std::remove(_jobs.begin(), _jobs.end(), job) , _jobs.end());
}
void PropagateUploadFileQNAM::abort()
void PropagateUploadFile::abort()
{
foreach(auto *job, _jobs) {
if (job->reply()) {
@ -887,7 +887,7 @@ void PropagateUploadFileQNAM::abort()
}
// This function is used whenever there is an error occuring and jobs might be in progress
void PropagateUploadFileQNAM::abortWithError(SyncFileItem::Status status, const QString &error)
void PropagateUploadFile::abortWithError(SyncFileItem::Status status, const QString &error)
{
_finished = true;
abort();

View file

@ -155,10 +155,10 @@ signals:
};
/**
* @brief The PropagateUploadFileQNAM class
* @brief The PropagateUploadFile class
* @ingroup libsync
*/
class PropagateUploadFileQNAM : public PropagateItemJob {
class PropagateUploadFile : public PropagateItemJob {
Q_OBJECT
private:
@ -191,7 +191,7 @@ private:
quint64 chunkSize() const { return _propagator->chunkSize(); }
public:
PropagateUploadFileQNAM(OwncloudPropagator* propagator,const SyncFileItemPtr& item)
PropagateUploadFile(OwncloudPropagator* propagator,const SyncFileItemPtr& item)
: PropagateItemJob(propagator, item), _startChunk(0), _currentChunk(0), _chunkCount(0), _transferId(0), _finished(false), _deleteExisting(false) {}
void start() Q_DECL_OVERRIDE;