summaryrefslogtreecommitdiff
path: root/src/package-lib/packageutilities.cpp
diff options
context:
space:
mode:
authorBernd Weimer <bernd.weimer@pelagicore.com>2020-01-28 09:23:17 +0100
committerBernd Weimer <bernd.weimer@pelagicore.com>2020-01-29 14:54:34 +0100
commita8ecf7df3873a21f5598f0e95abe6861805acc3a (patch)
treeb4a09532bdec4d5f6bede46866c80f3a4ca8a5c1 /src/package-lib/packageutilities.cpp
parent7cb1003e87edef973ee2a3f3267169b4daaa4ba6 (diff)
downloadqtapplicationmanager-a8ecf7df3873a21f5598f0e95abe6861805acc3a.tar.gz
Defer logging output until configuration is known
Logging output is deferred until the logging configuration is known to make sure that the content and format is appropriate. This also replaces special handling of deployment warnings. Added option to force instant logging. Task-number: AUTOSUITE-1423 Change-Id: Ieba5fb4ca675c7b7d025fc1847da8ca045c782d8 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/package-lib/packageutilities.cpp')
-rw-r--r--src/package-lib/packageutilities.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/package-lib/packageutilities.cpp b/src/package-lib/packageutilities.cpp
index f5e80180..be3db8b5 100644
--- a/src/package-lib/packageutilities.cpp
+++ b/src/package-lib/packageutilities.cpp
@@ -52,13 +52,14 @@
#include "packageutilities.h"
#include "packageutilities_p.h"
#include "global.h"
+#include "logging.h"
#include <clocale>
QT_BEGIN_NAMESPACE_AM
-bool PackageUtilities::ensureCorrectLocale(QStringList *warnings)
+bool PackageUtilities::ensureCorrectLocale()
{
// We need to make sure we are running in a Unicode locale, since we are
// running into problems when unpacking packages with libarchive that
@@ -68,7 +69,6 @@ bool PackageUtilities::ensureCorrectLocale(QStringList *warnings)
#if defined(Q_OS_WIN)
// Windows is UTF16
- Q_UNUSED(warnings)
return true;
#else
@@ -88,10 +88,8 @@ bool PackageUtilities::ensureCorrectLocale(QStringList *warnings)
if (checkUtf())
return true;
- if (warnings) {
- *warnings << qL1S("The current locale is not UTF-8 capable. Trying to find a capable one "
- "now, but this is time consuming and should be avoided");
- }
+ qCWarning(LogDeployment) << "The current locale is not UTF-8 capable. Trying to find a capable one now, "
+ "but this is time consuming and should be avoided";
// LC_ALL trumps all the rest, so if this is not specifying an UTF-8 locale, we need to unset it
QByteArray lc_all = qgetenv("LC_ALL");