aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/thread/FileReadTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/thread/FileReadTask.cpp')
-rw-r--r--src/core/thread/FileReadTask.cpp3
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));