aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/help
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-05 12:55:15 +0000
committersaturneric <[email protected]>2024-01-05 12:55:15 +0000
commit644aa4397b03dbef73f8bfedc13925b51cad836b (patch)
tree7788d1cd2f0687dd8e576b111d9990c580092e7a /src/ui/dialog/help
parentfix: slove some known issues (diff)
downloadGpgFrontend-644aa4397b03dbef73f8bfedc13925b51cad836b.tar.gz
GpgFrontend-644aa4397b03dbef73f8bfedc13925b51cad836b.zip
feat: integrate logging api to core
Diffstat (limited to 'src/ui/dialog/help')
-rw-r--r--src/ui/dialog/help/AboutDialog.cpp12
-rw-r--r--src/ui/dialog/help/GnupgTab.cpp20
2 files changed, 16 insertions, 16 deletions
diff --git a/src/ui/dialog/help/AboutDialog.cpp b/src/ui/dialog/help/AboutDialog.cpp
index 8d5ad896..7c534cbf 100644
--- a/src/ui/dialog/help/AboutDialog.cpp
+++ b/src/ui/dialog/help/AboutDialog.cpp
@@ -57,7 +57,7 @@ AboutDialog::AboutDialog(int defaultIndex, QWidget* parent)
tab_widget->addTab(update_tab_, _("Update"));
connect(tab_widget, &QTabWidget::currentChanged, this,
- [&](int index) { SPDLOG_DEBUG("current index: {}", index); });
+ [&](int index) { GF_UI_LOG_DEBUG("current index: {}", index); });
if (defaultIndex < tab_widget->count() && defaultIndex >= 0) {
tab_widget->setCurrentIndex(defaultIndex);
@@ -81,7 +81,7 @@ void AboutDialog::showEvent(QShowEvent* ev) { QDialog::showEvent(ev); }
InfoTab::InfoTab(QWidget* parent) : QWidget(parent) {
const auto gpgme_version = Module::RetrieveRTValueTypedOrDefault<>(
"core", "gpgme.version", std::string{"2.0.0"});
- SPDLOG_DEBUG("got gpgme version from rt: {}", gpgme_version);
+ GF_UI_LOG_DEBUG("got gpgme version from rt: {}", gpgme_version);
auto* pixmap = new QPixmap(":gpgfrontend-logo.png");
auto* text = new QString(
@@ -205,7 +205,7 @@ UpdateTab::UpdateTab(QWidget* parent) : QWidget(parent) {
void UpdateTab::showEvent(QShowEvent* event) {
QWidget::showEvent(event);
- SPDLOG_DEBUG("loading version loading info from rt");
+ GF_UI_LOG_DEBUG("loading version loading info from rt");
auto is_loading_done = Module::RetrieveRTValueTypedOrDefault<>(
"com.bktus.gpgfrontend.module.integrated.version-checking",
@@ -216,7 +216,7 @@ void UpdateTab::showEvent(QShowEvent* event) {
this, "com.bktus.gpgfrontend.module.integrated.version-checking",
"version.loading_done",
[=](Module::Namespace, Module::Key, int, std::any) {
- SPDLOG_DEBUG(
+ GF_UI_LOG_DEBUG(
"versionchecking version.loading_done changed, calling slot "
"version upgrade");
this->slot_show_version_status();
@@ -228,7 +228,7 @@ void UpdateTab::showEvent(QShowEvent* event) {
}
void UpdateTab::slot_show_version_status() {
- SPDLOG_DEBUG("loading version info from rt");
+ GF_UI_LOG_DEBUG("loading version info from rt");
this->pb_->setHidden(true);
auto is_loading_done = Module::RetrieveRTValueTypedOrDefault<>(
@@ -236,7 +236,7 @@ void UpdateTab::slot_show_version_status() {
"version.loading_done", false);
if (!is_loading_done) {
- SPDLOG_DEBUG("version info loading havn't been done yet.");
+ GF_UI_LOG_DEBUG("version info loading havn't been done yet.");
return;
}
diff --git a/src/ui/dialog/help/GnupgTab.cpp b/src/ui/dialog/help/GnupgTab.cpp
index cd48d2a8..ba5e464a 100644
--- a/src/ui/dialog/help/GnupgTab.cpp
+++ b/src/ui/dialog/help/GnupgTab.cpp
@@ -88,7 +88,7 @@ GpgFrontend::UI::GnupgTab::GnupgTab(QWidget* parent)
void GpgFrontend::UI::GnupgTab::process_software_info() {
const auto gnupg_version = Module::RetrieveRTValueTypedOrDefault<>(
"core", "gpgme.ctx.gnupg_version", std::string{"2.0.0"});
- SPDLOG_DEBUG("got gnupg version from rt: {}", gnupg_version);
+ GF_UI_LOG_DEBUG("got gnupg version from rt: {}", gnupg_version);
ui_->gnupgVersionLabel->setText(
QString::fromStdString(fmt::format("Version: {}", gnupg_version)));
@@ -96,7 +96,7 @@ void GpgFrontend::UI::GnupgTab::process_software_info() {
auto components = Module::ListRTChildKeys(
"com.bktus.gpgfrontend.module.integrated.gnupg-info-gathering",
"gnupg.components");
- SPDLOG_DEBUG("got gnupg components from rt, size: {}", components.size());
+ GF_UI_LOG_DEBUG("got gnupg components from rt, size: {}", components.size());
ui_->componentDetailsTable->setRowCount(components.size());
@@ -106,14 +106,14 @@ void GpgFrontend::UI::GnupgTab::process_software_info() {
"com.bktus.gpgfrontend.module.integrated.gnupg-info-gathering",
(boost::format("gnupg.components.%1%") % component).str(),
std::string{});
- SPDLOG_DEBUG("got gnupg component {} info from rt, info: {}", component,
- component_info_json);
+ GF_UI_LOG_DEBUG("got gnupg component {} info from rt, info: {}", component,
+ component_info_json);
auto component_info = nlohmann::json::parse(component_info_json);
if (!component_info.contains("name")) {
- SPDLOG_WARN("illegal gnupg component info, json: {}",
- component_info_json);
+ GF_UI_LOG_WARN("illegal gnupg component info, json: {}",
+ component_info_json);
continue;
}
@@ -184,14 +184,14 @@ void GpgFrontend::UI::GnupgTab::process_software_info() {
option)
.str(),
std::string{});
- SPDLOG_DEBUG("got gnupg component's option {} info from rt, info: {}",
- component, option_info_json);
+ GF_UI_LOG_DEBUG("got gnupg component's option {} info from rt, info: {}",
+ component, option_info_json);
auto option_info = nlohmann::json::parse(option_info_json);
if (!option_info.contains("name")) {
- SPDLOG_WARN("illegal gnupg configuation info, json: {}",
- option_info_json);
+ GF_UI_LOG_WARN("illegal gnupg configuation info, json: {}",
+ option_info_json);
continue;
}