Don't access static functions via Utils::HostOsInfo instance

Change-Id: Ic45b8f324cb7c6a4691545fc8d668eed69dfeced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2020-11-18 18:42:27 +01:00
parent 30aec82285
commit 871c8e3ffd
5 changed files with 12 additions and 12 deletions

View File

@@ -91,10 +91,10 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q)
m_ui.showShortcutsInContextMenus->setVisible(false);
#endif
if (Utils::HostOsInfo().isMacHost()) {
if (Utils::HostOsInfo::isMacHost()) {
m_ui.dpiCheckbox->setVisible(false);
} else {
const bool defaultValue = Utils::HostOsInfo().isWindowsHost();
const bool defaultValue = Utils::HostOsInfo::isWindowsHost();
m_ui.dpiCheckbox->setChecked(ICore::settings()->value(settingsKeyDPI, defaultValue).toBool());
connect(m_ui.dpiCheckbox, &QCheckBox::toggled, this, [](bool checked) {
ICore::settings()->setValue(settingsKeyDPI, checked);