diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-01-26 15:58:42 +0200 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-02-04 12:00:05 +0200 |
commit | cf48632f89383c9f96346ef8d0ac794f611766a0 (patch) | |
tree | 920d58db465e6f2b2d4f920244c9537312df3191 /src/libs/installer/packagemanagergui.cpp | |
parent | ca6dac1b663a7cefcb576692384d69ac0b85b0a5 (diff) |
Restructure logging utilities
Create a singleton-pattern class as an encapsulation unit for holding
and altering the state of debug printing attributes. Move related code
from various places under a single umbrella header file for logging
utilities, with some minor stylistic changes & cleanup.
This acts as a preparatory change for providing non-blocking headless
CLI runs when there is no TTY attached - that will be fixed in a
follow-up change.
Change-Id: Ib7f72cf75362c3ea6713058e92eda997d6df55c3
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagergui.cpp')
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index beb8603a4..e9f3a42fa 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -41,6 +41,7 @@ #include "productkeycheck.h" #include "repositorycategory.h" #include "componentselectionpage_p.h" +#include "loggingutils.h" #include "sysinfo.h" #include "globals.h" @@ -2578,7 +2579,7 @@ void ReadyForInstallationPage::entering() QString htmlOutput; bool componentsOk = packageManagerCore()->calculateComponents(&htmlOutput); m_taskDetailsBrowser->setHtml(htmlOutput); - m_taskDetailsBrowser->setVisible(!componentsOk || isVerbose()); + m_taskDetailsBrowser->setVisible(!componentsOk || LoggingHandler::instance().isVerbose()); setComplete(componentsOk); QString spaceInfo; @@ -2719,7 +2720,7 @@ void PerformInstallationPage::entering() if (packageManagerCore()->settings().productImages().count() > 1) m_imageChangeTimer.start(); - if (isVerbose()) { + if (LoggingHandler::instance().isVerbose()) { m_performInstallationForm->toggleDetails(); } if (packageManagerCore()->isUninstaller()) { |