diff options
author | saturneric <[email protected]> | 2024-01-17 16:14:13 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-17 16:14:13 +0000 |
commit | 37848811b6c8ca6c2a707431ec077c8098918afe (patch) | |
tree | 2ed4e5759ca6c432171963068beca61a164e98d2 /src/core/thread/FileReadTask.cpp | |
parent | feat: update ci files and reduce dependencies (diff) | |
download | GpgFrontend-37848811b6c8ca6c2a707431ec077c8098918afe.tar.gz GpgFrontend-37848811b6c8ca6c2a707431ec077c8098918afe.zip |
fix: improve code quality, docs and ci files
Diffstat (limited to 'src/core/thread/FileReadTask.cpp')
-rw-r--r-- | src/core/thread/FileReadTask.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/thread/FileReadTask.cpp b/src/core/thread/FileReadTask.cpp index c757d4c0..49a3f540 100644 --- a/src/core/thread/FileReadTask.cpp +++ b/src/core/thread/FileReadTask.cpp @@ -61,7 +61,8 @@ auto FileReadTask::Run() -> int { void FileReadTask::slot_read_bytes() { QByteArray read_buffer; - if (!target_file_.atEnd() && + if (QByteArray read_buffer; + !target_file_.atEnd() && (read_buffer = target_file_.read(kBufferSize)).size() > 0) { GF_CORE_LOG_DEBUG("io thread read bytes: {}", read_buffer.size()); emit SignalFileBytesRead(std::move(read_buffer)); |