From 5bc4e23a57f149c2a7008c1b88ab3d398ce75e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Wed, 2 Jun 2021 10:56:52 +0200 Subject: [PATCH] qt: Add separate logging category for result of config loading * lang/qt/src/qgpgme_debug.h: Make include guard match file name. * lang/qt/src/qgpgme_debug.h, lang/qt/src/qgpgme_debug.cpp (QGPGME_CONFIG_LOADING_LOG): New. * lang/qt/src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfig::reloadConfiguration): Use new logging category. -- Use a separate logging category for the extremely noisy logging of the result of config loading to make debug logging more useful. GnuPG-bug-id: 5217 --- lang/qt/src/qgpgme_debug.cpp | 4 ++-- lang/qt/src/qgpgme_debug.h | 7 +++---- lang/qt/src/qgpgmenewcryptoconfig.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lang/qt/src/qgpgme_debug.cpp b/lang/qt/src/qgpgme_debug.cpp index 4ed859e2..513a9b08 100644 --- a/lang/qt/src/qgpgme_debug.cpp +++ b/lang/qt/src/qgpgme_debug.cpp @@ -1,5 +1,3 @@ -// This file is autogenerated by CMake: DO NOT EDIT - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -9,6 +7,8 @@ #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme", QtWarningMsg) +Q_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG, "gpg.qgpgme.config_loading", QtInfoMsg) #else Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme") +Q_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG, "gpg.qgpgme.config_loading") #endif diff --git a/lang/qt/src/qgpgme_debug.h b/lang/qt/src/qgpgme_debug.h index 38c16ad3..9cdd1a8c 100644 --- a/lang/qt/src/qgpgme_debug.h +++ b/lang/qt/src/qgpgme_debug.h @@ -1,11 +1,10 @@ -// This file is autogenerated by CMake: DO NOT EDIT - -#ifndef QGPGME_LOG_H -#define QGPGME_LOG_H +#ifndef QGPGME_QGPGME_DEBUG_H +#define QGPGME_QGPGME_DEBUG_H #include Q_DECLARE_LOGGING_CATEGORY(QGPGME_LOG) +Q_DECLARE_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG) #endif diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp index f994fea8..04289467 100644 --- a/lang/qt/src/qgpgmenewcryptoconfig.cpp +++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp @@ -101,7 +101,7 @@ void QGpgMENewCryptoConfig::reloadConfiguration(bool) << "components:\n"; std::copy(components.begin(), components.end(), std::ostream_iterator(ss, "\n")); - qCDebug(QGPGME_LOG) << ss.str().c_str(); + qCDebug(QGPGME_CONFIG_LOADING_LOG) << ss.str().c_str(); } #endif #if 0