summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/progresscoordinator.cpp
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-01-26 15:58:42 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-02-04 12:00:05 +0200
commitcf48632f89383c9f96346ef8d0ac794f611766a0 (patch)
tree920d58db465e6f2b2d4f920244c9537312df3191 /src/libs/installer/progresscoordinator.cpp
parentca6dac1b663a7cefcb576692384d69ac0b85b0a5 (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/progresscoordinator.cpp')
-rw-r--r--src/libs/installer/progresscoordinator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/installer/progresscoordinator.cpp b/src/libs/installer/progresscoordinator.cpp
index 7af24cb77..01b92bff8 100644
--- a/src/libs/installer/progresscoordinator.cpp
+++ b/src/libs/installer/progresscoordinator.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -35,6 +35,7 @@
#include "globals.h"
#include "utils.h"
+#include "loggingutils.h"
using namespace QInstaller;
@@ -312,7 +313,7 @@ void ProgressCoordinator::emitDownloadStatus(const QString &status)
void ProgressCoordinator::printProgressPercentage(int progress)
{
- if (!isVerbose())
+ if (!LoggingHandler::instance().isVerbose())
return;
Q_ASSERT(m_progressSpinner->currentIndex < m_progressSpinner->spinnerChars.size());