diff options
| author | saturneric <[email protected]> | 2026-09-22 22:35:33 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-22 22:35:33 +0200 |
| commit | 7edd13eecb89624cead26e20acace9fe81afc457 (patch) | |
| tree | 5a4e6f023712f025fc57a39c95e23c976c98bdc1 /src | |
| parent | fix(email): correct analysis argument ordering (diff) | |
| download | modules-7edd13eecb89624cead26e20acace9fe81afc457.tar.gz modules-7edd13eecb89624cead26e20acace9fe81afc457.zip | |
style(gnupg): improve GnuPG log messages
- clarify gathering and command execution status messages
- improve checksum failure wording
- standardize GnuPG capitalization and validation warnings
- replace “illegal” and “doesn't have” with clearer terminology
Diffstat (limited to 'src')
| -rw-r--r-- | src/m_gpg_info/GnuPGInfoGatheringModule.cpp | 13 | ||||
| -rw-r--r-- | src/m_gpg_info/GnupgTab.cpp | 8 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/m_gpg_info/GnuPGInfoGatheringModule.cpp b/src/m_gpg_info/GnuPGInfoGatheringModule.cpp index a8abdd9..72998c1 100644 --- a/src/m_gpg_info/GnuPGInfoGatheringModule.cpp +++ b/src/m_gpg_info/GnuPGInfoGatheringModule.cpp @@ -177,7 +177,7 @@ auto StartStartGatheringGnuPGComponentsInfo(const QString &gpgme_version, gf::sdk::RunCommand(GFModuleSdkContext(), gpgconf_path, {"--homedir", default_home_path, "--list-components"}, GetGpgComponentInfos, &context); - LOG_DEBUG("loading gnupg component info done."); + LOG_DEBUG("finished loading GnuPG component info"); return 0; } @@ -191,7 +191,7 @@ auto StartGatheringAllGnuPGInfo() -> int { LOG_D() << "got gpgconf path from rt:" << gpgconf_path; if (gpgconf_path.isEmpty()) { - LOG_DEBUG("gpgconf path is empty, skip gathering gnupg info."); + LOG_DEBUG("gpgconf path is empty; skipping GnuPG info gathering"); return -1; } @@ -272,8 +272,8 @@ auto CalculateBinaryChecksum(const QString &path) -> std::optional<QString> { // Open and read the file. QFile f(info.filePath()); if (!f.open(QIODevice::ReadOnly)) { - LOG_D() << "open" << path - << "to calculate checksum error:" << f.errorString(); + LOG_D() << "cannot open" << path + << "for checksum calculation:" << f.errorString(); return {}; } @@ -307,8 +307,7 @@ void GetGpgComponentInfos(void *data, int exit_code, const char *out, << "process stdout size:" << p_out.size(); if (exit_code != 0) { - LOG_D() << "gpgconf execute error, process stderr:" << p_err - << "process stdout:" << p_out; + LOG_D() << "gpgconf failed, stderr:" << p_err << "process stdout:" << p_out; return; } @@ -408,7 +407,7 @@ void GetGpgComponentInfos(void *data, int exit_code, const char *out, component_infos.push_back(c_i); } - LOG_DEBUG("load gnupg component info actually done."); + LOG_DEBUG("finished loading GnuPG component info (all components)"); } } diff --git a/src/m_gpg_info/GnupgTab.cpp b/src/m_gpg_info/GnupgTab.cpp index 416d9f8..4581480 100644 --- a/src/m_gpg_info/GnupgTab.cpp +++ b/src/m_gpg_info/GnupgTab.cpp @@ -135,14 +135,14 @@ void GnupgTab::slot_process_software_info() { auto component_info_json = QJsonDocument::fromJson(component_info_json_bytes.toUtf8()); if (!component_info_json.isObject()) { - MLogWarn(QString("illegal gnupg component info, json: %1") + MLogWarn(QString("invalid GnuPG component info, json: %1") .arg(component_info_json_bytes)); continue; } auto component_info = component_info_json.object(); if (!component_info.contains("name")) { - MLogWarn(QString("illegal gnupg component info: it doesn't have a " + MLogWarn(QString("invalid GnuPG component info: it has no " "name, json: %1") .arg(component_info_json_bytes)); continue; @@ -249,14 +249,14 @@ void GnupgTab::slot_process_software_info() { QJsonDocument::fromJson(option_info_json_bytes.toUtf8()); if (!option_info_json.isObject()) { - MLogWarn(QString("illegal gnupg option info, json: %1") + MLogWarn(QString("invalid GnuPG option info, json: %1") .arg(option_info_json_bytes)); continue; } auto option_info = option_info_json.object(); if (!option_info.contains("name")) { - MLogWarn(QString("illegal gnupg configuration info: it doesn't have a " + MLogWarn(QString("invalid GnuPG configuration info: it has no " "name, json: %1") .arg(option_info_json_bytes)); continue; |
