aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/function
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/function
parentfix: slove some known issues (diff)
downloadGpgFrontend-644aa4397b03dbef73f8bfedc13925b51cad836b.tar.gz
GpgFrontend-644aa4397b03dbef73f8bfedc13925b51cad836b.zip
feat: integrate logging api to core
Diffstat (limited to 'src/ui/function')
-rw-r--r--src/ui/function/ArchiveDirectory.cpp6
-rw-r--r--src/ui/function/GenerateRevokeCertification.cpp6
-rw-r--r--src/ui/function/RaisePinentry.cpp10
-rw-r--r--src/ui/function/SetOwnerTrustLevel.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/ui/function/ArchiveDirectory.cpp b/src/ui/function/ArchiveDirectory.cpp
index 9cbfc41e..89bb7ff2 100644
--- a/src/ui/function/ArchiveDirectory.cpp
+++ b/src/ui/function/ArchiveDirectory.cpp
@@ -71,13 +71,13 @@ auto ArchiveDirectory::Exec(const std::filesystem::path& target_directory)
auto target_path = target_directory;
target_path = target_path.replace_extension("");
- SPDLOG_DEBUG("archive directory, base path: {}, target path: {}",
- base_path.string(), target_path.string());
+ GF_UI_LOG_DEBUG("archive directory, base path: {}, target path: {}",
+ base_path.string(), target_path.string());
// ArchiveFileOperator::CreateArchive(base_path, target_path, 0, );
} catch (...) {
- SPDLOG_ERROR("archive caught exception error");
+ GF_UI_LOG_ERROR("archive caught exception error");
return {false, {}};
}
}
diff --git a/src/ui/function/GenerateRevokeCertification.cpp b/src/ui/function/GenerateRevokeCertification.cpp
index a1c99d95..5d5b1702 100644
--- a/src/ui/function/GenerateRevokeCertification.cpp
+++ b/src/ui/function/GenerateRevokeCertification.cpp
@@ -48,12 +48,12 @@ auto GenerateRevokeCertification::Exec(const GpgKey& key,
std::move(output_path), "--gen-revoke", key.GetFingerprint()},
[=](int exit_code, const std::string& p_out, const std::string& p_err) {
if (exit_code != 0) {
- SPDLOG_ERROR(
+ GF_UI_LOG_ERROR(
"gnupg gen revoke execute error, process stderr: {}, process "
"stdout: {}",
p_err, p_out);
} else {
- SPDLOG_DEBUG(
+ GF_UI_LOG_DEBUG(
"gnupg gen revoke exit_code: {}, process stdout size: {}",
exit_code, p_out.size());
}
@@ -63,7 +63,7 @@ auto GenerateRevokeCertification::Exec(const GpgKey& key,
// Code From Gpg4Win
while (proc->canReadLine()) {
const QString line = QString::fromUtf8(proc->readLine()).trimmed();
- SPDLOG_DEBUG("line: {}", line.toStdString());
+ GF_UI_LOG_DEBUG("line: {}", line.toStdString());
if (line == QLatin1String("[GNUPG:] GET_BOOL gen_revoke.okay")) {
proc->write("y\n");
} else if (line == QLatin1String("[GNUPG:] GET_LINE "
diff --git a/src/ui/function/RaisePinentry.cpp b/src/ui/function/RaisePinentry.cpp
index 31804fa8..1e48e984 100644
--- a/src/ui/function/RaisePinentry.cpp
+++ b/src/ui/function/RaisePinentry.cpp
@@ -39,8 +39,8 @@ auto FindTopMostWindow(QWidget* fallback) -> QWidget* {
QList<QWidget*> top_widgets = QApplication::topLevelWidgets();
foreach (QWidget* widget, top_widgets) {
if (widget->isActiveWindow()) {
- SPDLOG_TRACE("find a topmost widget, address: {}",
- static_cast<void*>(widget));
+ GF_UI_LOG_TRACE("find a topmost widget, address: {}",
+ static_cast<void*>(widget));
return widget;
}
}
@@ -55,7 +55,7 @@ auto RaisePinentry::Exec() -> int {
QString::fromStdString(_("Show passphrase")),
QString::fromStdString(_("Hide passphrase")));
- SPDLOG_DEBUG("setting pinetry's arguments");
+ GF_UI_LOG_DEBUG("setting pinetry's arguments");
pinentry->setPrompt(QString::fromStdString(_("PIN:")));
pinentry->setDescription(QString());
@@ -74,11 +74,11 @@ auto RaisePinentry::Exec() -> int {
pinentry->setOkText(_("Confirm"));
pinentry->setCancelText(_("Cancel"));
- SPDLOG_DEBUG("pinentry is ready to start");
+ GF_UI_LOG_DEBUG("pinentry is ready to start");
connect(pinentry, &PinEntryDialog::finished, this, [pinentry](int result) {
bool ret = result != 0;
- SPDLOG_DEBUG("pinentry finished, ret: {}", ret);
+ GF_UI_LOG_DEBUG("pinentry finished, ret: {}", ret);
if (!ret) {
emit CoreSignalStation::GetInstance()->SignalUserInputPassphraseCallback(
diff --git a/src/ui/function/SetOwnerTrustLevel.cpp b/src/ui/function/SetOwnerTrustLevel.cpp
index 4154b5ff..290b1436 100644
--- a/src/ui/function/SetOwnerTrustLevel.cpp
+++ b/src/ui/function/SetOwnerTrustLevel.cpp
@@ -54,7 +54,7 @@ auto SetOwnerTrustLevel::Exec(const std::string& key_id) -> bool {
key.GetOwnerTrustLevel(), false, &ok);
if (ok && !item.isEmpty()) {
- SPDLOG_DEBUG("selected owner trust policy: {}", item.toStdString());
+ GF_UI_LOG_DEBUG("selected owner trust policy: {}", item.toStdString());
int trust_level = 0; // Unknown Level
if (item == _("Ultimate")) {
trust_level = 5;