aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2023-02-25 11:49:54 +0000
committerGitHub <[email protected]>2023-02-25 11:49:54 +0000
commitaf1cd680f2496629026ba27707cef2afd860f5f9 (patch)
tree78e78450893e98b8828cc41010e377c1561e5f34 /src/ui/widgets/PlainTextEditorPage.cpp
parentfix: improve manual (diff)
parentfeat: use aqt to install qt in ci build (diff)
downloadGpgFrontend-af1cd680f2496629026ba27707cef2afd860f5f9.tar.gz
GpgFrontend-af1cd680f2496629026ba27707cef2afd860f5f9.zip
Merge pull request #91 from saturneric/dev/2.0.10/main
Develop 2.1.0.1
Diffstat (limited to '')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 10e19b8b..c9a65a4c 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -160,8 +160,6 @@ void PlainTextEditorPage::slot_format_gpg_header() {
}
void PlainTextEditorPage::ReadFile() {
- LOG(INFO) << "called";
-
read_done_ = false;
read_bytes_ = 0;
ui_->textPage->setEnabled(false);
@@ -184,10 +182,10 @@ void PlainTextEditorPage::ReadFile() {
connect(this, &PlainTextEditorPage::SignalUIBytesDisplayed, read_task,
&FileReadTask::SignalFileBytesReadNext, Qt::QueuedConnection);
- connect(read_task, &FileReadTask::SignalTaskFinished, this,
- []() { LOG(INFO) << "read thread closed"; });
+ connect(read_task, &FileReadTask::SignalTaskRunnableEnd, this,
+ []() { SPDLOG_DEBUG("read thread closed"); });
connect(this, &PlainTextEditorPage::close, read_task,
- &FileReadTask::SignalTaskFinished);
+ [=]() { read_task->SignalTaskRunnableEnd(0); });
connect(read_task, &FileReadTask::SignalFileBytesReadEnd, this, [=]() {
// set the UI
if (!binary_mode_) text_page->setReadOnly(false);
@@ -212,7 +210,7 @@ std::string binary_to_string(const std::string &source) {
void PlainTextEditorPage::slot_insert_text(QByteArray bytes_data) {
std::string data = bytes_data.toStdString();
- LOG(INFO) << "data size" << data.size();
+ SPDLOG_DEBUG("data size: {}", data.size());
read_bytes_ += data.size();
// If binary format is detected, the entire file is converted to binary
// format for display.
@@ -260,7 +258,6 @@ void PlainTextEditorPage::slot_insert_text(QByteArray bytes_data) {
this->ui_->characterLabel->setText(str.str().c_str());
}
QTimer::singleShot(25, this, &PlainTextEditorPage::SignalUIBytesDisplayed);
- LOG(INFO) << "end";
}
void PlainTextEditorPage::detect_encoding(const std::string &data) {