From 9d39aa260d8d42ca253ae0e23bbd1e415871fe00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 5 Mar 2025 17:19:00 +0100 Subject: [PATCH] Windows: Remove support for QT_QPA_VERBOSE logging environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have QT_LOGGING_RULES nowadays, and the verbosity levels for QWindowsContext are controlled by the `verbose` platform plugin argument. Change-Id: I3f998afaa962220b7babb093c030d0798e450db0 Reviewed-by: Kai Köhne Reviewed-by: Zhao Yuhang <2546789017@qq.com> Reviewed-by: Wladimir Leuschner --- src/plugins/platforms/windows/main.cpp | 10 +--------- src/plugins/platforms/windows/qwindowscontext.cpp | 4 ---- src/plugins/platforms/windows/qwindowscontext.h | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/plugins/platforms/windows/main.cpp b/src/plugins/platforms/windows/main.cpp index 51c1fb4a453..417f167c440 100644 --- a/src/plugins/platforms/windows/main.cpp +++ b/src/plugins/platforms/windows/main.cpp @@ -25,17 +25,9 @@ using namespace Qt::StringLiterals; \li \c fontengine=native Indicates that native font engine should be used (default) \li \c fontengine=freetype Indicates that freetype font engine should be used \li \c gl=gdi Indicates that ARB Open GL functionality should not be used + \li \c verbose= Chooses the verbosity level of the platform plugin logging (0-9). \endlist - \section1 Tips - - \list - \li The environment variable \c QT_QPA_VERBOSE controls - the debug level. It takes the form - \c{:,:}, where - keyword is one of \c integration, \c windows, \c backingstore and - \c fonts. Level is an integer 0..9. - \endlist \internal */ diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 17eef9a95e8..4c24b119929 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -181,10 +181,6 @@ QWindowsContext::QWindowsContext() : # pragma warning( disable : 4996 ) #endif m_instance = this; - // ### FIXME: Remove this once the logging system has other options of configurations. - const QByteArray bv = qgetenv("QT_QPA_VERBOSE"); - if (!bv.isEmpty()) - QLoggingCategory::setFilterRules(QString::fromLocal8Bit(bv)); } QWindowsContext::~QWindowsContext() diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h index 4e9be1af967..4caf16e2dd1 100644 --- a/src/plugins/platforms/windows/qwindowscontext.h +++ b/src/plugins/platforms/windows/qwindowscontext.h @@ -56,7 +56,7 @@ public: SI_SupportsTouch = 0x2 }; - // Verbose flag set by environment variable QT_QPA_VERBOSE + // Verbose flag set by the `verbose` platform plugin argument static int verbose; explicit QWindowsContext();