ConsoleProcess: Make setSettings() a static member

Since it's not possible to use directly ICore::settings()
inside Utils lib, make setSettings() a static member.
This simplifies the API of other static methods.
Set the settings just once now, inside main().

Change-Id: I2bcc58d4d29b5aba4a1a21a98a9f4245b24b530f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-01-21 11:28:50 +01:00
parent b3375cfd56
commit 74f522e0de
8 changed files with 34 additions and 46 deletions

View File

@@ -33,6 +33,7 @@
#include <qtsingleapplication.h>
#include <utils/algorithm.h>
#include <utils/consoleprocess.h>
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
@@ -551,6 +552,7 @@ int main(int argc, char **argv)
QSettings::SystemScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String(Core::Constants::IDE_CASED_ID));
Utils::ConsoleProcess::setSettings(settings);
loadFonts();
if (Utils::HostOsInfo::isWindowsHost()