rename variable

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
(cherry picked from commit 269938dfd866df5918eb44779667142f7a157c22)
This commit is contained in:
Trial97 2025-03-23 08:52:08 +02:00 committed by github-actions[bot]
parent b49e9763bf
commit b348114dee
3 changed files with 6 additions and 6 deletions

View File

@ -54,7 +54,7 @@ Task::State FileSink::init(QNetworkRequest& request)
return Task::State::Failed; return Task::State::Failed;
} }
wroteAnyData = false; m_wroteAnyData = false;
m_output_file.reset(new PSaveFile(m_filename)); m_output_file.reset(new PSaveFile(m_filename));
if (!m_output_file->open(QIODevice::WriteOnly)) { if (!m_output_file->open(QIODevice::WriteOnly)) {
qCCritical(taskNetLogC) << "Could not open " + m_filename + " for writing"; qCCritical(taskNetLogC) << "Could not open " + m_filename + " for writing";
@ -72,11 +72,11 @@ Task::State FileSink::write(QByteArray& data)
qCCritical(taskNetLogC) << "Failed writing into " + m_filename; qCCritical(taskNetLogC) << "Failed writing into " + m_filename;
m_output_file->cancelWriting(); m_output_file->cancelWriting();
m_output_file.reset(); m_output_file.reset();
wroteAnyData = false; m_wroteAnyData = false;
return Task::State::Failed; return Task::State::Failed;
} }
wroteAnyData = true; m_wroteAnyData = true;
return Task::State::Running; return Task::State::Running;
} }
@ -100,7 +100,7 @@ Task::State FileSink::finalize(QNetworkReply& reply)
// if we wrote any data to the save file, we try to commit the data to the real file. // if we wrote any data to the save file, we try to commit the data to the real file.
// if it actually got a proper file, we write it even if it was empty // if it actually got a proper file, we write it even if it was empty
if (gotFile || wroteAnyData) { if (gotFile || m_wroteAnyData) {
// ask validators for data consistency // ask validators for data consistency
// we only do this for actual downloads, not 'your data is still the same' cache hits // we only do this for actual downloads, not 'your data is still the same' cache hits
if (!finalizeAllValidators(reply)) if (!finalizeAllValidators(reply))

View File

@ -58,7 +58,7 @@ class FileSink : public Sink {
protected: protected:
QString m_filename; QString m_filename;
bool wroteAnyData = false; bool m_wroteAnyData = false;
std::unique_ptr<PSaveFile> m_output_file; std::unique_ptr<PSaveFile> m_output_file;
}; };
} // namespace Net } // namespace Net

View File

@ -78,7 +78,7 @@ Task::State MetaCacheSink::finalizeCache(QNetworkReply& reply)
{ {
QFileInfo output_file_info(m_filename); QFileInfo output_file_info(m_filename);
if (wroteAnyData) { if (m_wroteAnyData) {
m_entry->setMD5Sum(m_md5Node->hash().toHex().constData()); m_entry->setMD5Sum(m_md5Node->hash().toHex().constData());
} }