aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-02-03 13:43:55 +0000
committerSaturneric <[email protected]>2023-02-03 13:43:55 +0000
commit11d32517c2f6f538209c893c6b0b24572fba1a36 (patch)
tree0dac14bcad75d9c7c5b5723dc23e6409721966b4 /src/ui/widgets/PlainTextEditorPage.cpp
parentfeat: change logging framework to spdlog (diff)
downloadGpgFrontend-11d32517c2f6f538209c893c6b0b24572fba1a36.tar.gz
GpgFrontend-11d32517c2f6f538209c893c6b0b24572fba1a36.zip
feat: change the log style in source files
Diffstat (limited to 'src/ui/widgets/PlainTextEditorPage.cpp')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 10e19b8b..fc6a25bf 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -160,7 +160,7 @@ void PlainTextEditorPage::slot_format_gpg_header() {
}
void PlainTextEditorPage::ReadFile() {
- LOG(INFO) << "called";
+ SPDLOG_INFO("called");
read_done_ = false;
read_bytes_ = 0;
@@ -185,7 +185,7 @@ void PlainTextEditorPage::ReadFile() {
&FileReadTask::SignalFileBytesReadNext, Qt::QueuedConnection);
connect(read_task, &FileReadTask::SignalTaskFinished, this,
- []() { LOG(INFO) << "read thread closed"; });
+ []() { SPDLOG_INFO("read thread closed"); });
connect(this, &PlainTextEditorPage::close, read_task,
&FileReadTask::SignalTaskFinished);
connect(read_task, &FileReadTask::SignalFileBytesReadEnd, this, [=]() {
@@ -212,7 +212,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_INFO("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 +260,7 @@ 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";
+ SPDLOG_INFO("end");
}
void PlainTextEditorPage::detect_encoding(const std::string &data) {