diff options
author | Saturneric <[email protected]> | 2022-01-23 07:36:55 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-23 07:38:54 +0000 |
commit | 247b5b8f7ffb5cf7df5d4bc0e4fb786152934569 (patch) | |
tree | daa5b6f39a1a4c07d4fa10a478d159e17059609c /src/ui/thread/FileReadThread.cpp | |
parent | <refactor>(ui): tidy up codes and comments. (diff) | |
download | GpgFrontend-247b5b8f7ffb5cf7df5d4bc0e4fb786152934569.tar.gz GpgFrontend-247b5b8f7ffb5cf7df5d4bc0e4fb786152934569.zip |
<refactor>(ui): tidy up codes and comments.
1. tidy up thread.
Diffstat (limited to '')
-rw-r--r-- | src/ui/thread/FileReadThread.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/thread/FileReadThread.cpp b/src/ui/thread/FileReadThread.cpp index 1e991752..1ed9ae60 100644 --- a/src/ui/thread/FileReadThread.cpp +++ b/src/ui/thread/FileReadThread.cpp @@ -31,13 +31,13 @@ namespace GpgFrontend::UI { -FileReadThread::FileReadThread(std::string path) : path(std::move(path)) { +FileReadThread::FileReadThread(std::string path) : path_(std::move(path)) { qRegisterMetaType<std::string>("std::string"); } void FileReadThread::run() { LOG(INFO) << "started"; - boost::filesystem::path read_file_path(this->path); + boost::filesystem::path read_file_path(this->path_); if (is_regular_file(read_file_path)) { LOG(INFO) << "read open"; @@ -56,7 +56,7 @@ void FileReadThread::run() { LOG(INFO) << "block size " << read_size; std::string buffer_str(buffer, read_size); - emit sendReadBlock(buffer_str); + emit SignalSendReadBlock(buffer_str); #ifdef RELEASE QThread::msleep(32); #else @@ -64,7 +64,7 @@ void FileReadThread::run() { #endif } fclose(fp); - emit readDone(); + emit SignalReadDone(); LOG(INFO) << "thread end reading"; } } |