summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qlibrary_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-09-22 19:31:32 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-11-11 13:26:14 -0800
commitfba4ca0ec11d653791a7f6fb1e1d5e06103aeebb (patch)
tree2f8d1af1826acdb4bee7f368a3bac48f64942c75 /src/corelib/plugin/qlibrary_p.h
parentd36249e9759364a7025b531d1dfe89a891e65a4e (diff)
QLibrary/QPlugin/QFactoryLoader: convert to category logging
This adds three categories: - qt.core.library - qt.core.plugin.loader - qt.core.plugin.factoryloader plus the "qt.core.plugin.elfparser" category (only available in developer builds). All three use the new Q_LOGGING_CATEGORY_WITH_ENV_OVERRIDE technique which enables their debugging if the QT_DEBUG_PLUGINS=1 variable is set. As a consequence, some warnings were downgraded to debug messages. I've only left as warnings situations where a real problem occurred, since they now get printed by default: failures to open or mmap a file, corrupt plugin metadata (but not scan of non-plugins), use of QPluginLoader with a static build of Qt. Drive-by update of some messages to make them prettier and/or use qUtf16Printable(). Change-Id: I3eb1bd30e0124f89a052fffd16a752acfe89c19e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/plugin/qlibrary_p.h')
-rw-r--r--src/corelib/plugin/qlibrary_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index 3c43d79e25..42d3d7256d 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -55,6 +55,7 @@
#include "QtCore/qlibrary.h"
#include "QtCore/private/qfactoryloader_p.h"
+#include "QtCore/qloggingcategory.h"
#include "QtCore/qmutex.h"
#include "QtCore/qplugin.h"
#include "QtCore/qpointer.h"
@@ -67,7 +68,7 @@ QT_REQUIRE_CONFIG(library);
QT_BEGIN_NAMESPACE
-bool qt_debug_component();
+Q_DECLARE_LOGGING_CATEGORY(qt_lcDebugPlugins)
struct QLibraryScanResult
{