diff --git a/src/app/main.cpp b/src/app/main.cpp index d18502e1f0a..9f540e7279d 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -327,12 +327,12 @@ static inline QSettings *userSettings() static void setHighDpiEnvironmentVariable() { - if (Utils::HostOsInfo().isMacHost()) + if (Utils::HostOsInfo::isMacHost()) return; std::unique_ptr settings(createUserSettings()); - const bool defaultValue = Utils::HostOsInfo().isWindowsHost(); + const bool defaultValue = Utils::HostOsInfo::isWindowsHost(); const bool enableHighDpiScaling = settings->value("Core/EnableHighDpiScaling", defaultValue).toBool(); static const char ENV_VAR_QT_DEVICE_PIXEL_RATIO[] = "QT_DEVICE_PIXEL_RATIO"; @@ -540,7 +540,7 @@ int main(int argc, char **argv) QLatin1String(Core::Constants::IDE_CASED_ID)); loadFonts(); - if (Utils::HostOsInfo().isWindowsHost() + if (Utils::HostOsInfo::isWindowsHost() && !qFuzzyCompare(qApp->devicePixelRatio(), 1.0) && QApplication::style()->objectName().startsWith( QLatin1String("windows"), Qt::CaseInsensitive)) { diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 35f2cd4d39f..ef807f23006 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -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); diff --git a/src/plugins/coreplugin/plugininstallwizard.cpp b/src/plugins/coreplugin/plugininstallwizard.cpp index 6ca5443b802..09e23eb6e95 100644 --- a/src/plugins/coreplugin/plugininstallwizard.cpp +++ b/src/plugins/coreplugin/plugininstallwizard.cpp @@ -68,18 +68,18 @@ struct Data static QStringList libraryNameFilter() { - if (HostOsInfo().isWindowsHost()) + if (HostOsInfo::isWindowsHost()) return {"*.dll"}; - if (HostOsInfo().isLinuxHost()) + if (HostOsInfo::isLinuxHost()) return {"*.so"}; return {"*.dylib"}; } static bool hasLibSuffix(const FilePath &path) { - return (HostOsInfo().isWindowsHost() && path.endsWith(".dll")) - || (HostOsInfo().isLinuxHost() && path.toFileInfo().completeSuffix().startsWith(".so")) - || (HostOsInfo().isMacHost() && path.endsWith(".dylib")); + return (HostOsInfo::isWindowsHost() && path.endsWith(".dll")) + || (HostOsInfo::isLinuxHost() && path.toFileInfo().completeSuffix().startsWith(".so")) + || (HostOsInfo::isMacHost() && path.endsWith(".dylib")); } static FilePath pluginInstallPath(bool installIntoApplication) diff --git a/src/plugins/mcusupport/mcusupportoptions.cpp b/src/plugins/mcusupport/mcusupportoptions.cpp index b85847d59c6..b5f9151db8f 100644 --- a/src/plugins/mcusupport/mcusupportoptions.cpp +++ b/src/plugins/mcusupport/mcusupportoptions.cpp @@ -615,7 +615,7 @@ static void setKitEnvironment(Kit *k, const McuTarget *mcuTarget, processPackage(package); processPackage(qtForMCUsSdkPackage); - const QString path = QLatin1String(HostOsInfo().isWindowsHost() ? "Path" : "PATH"); + const QString path = QLatin1String(HostOsInfo::isWindowsHost() ? "Path" : "PATH"); pathAdditions.append("${" + path + "}"); pathAdditions.append(QDir::toNativeSeparators(Core::ICore::libexecPath() + "/clang/bin")); changes.append({path, pathAdditions.join(HostOsInfo::pathListSeparator())}); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index 594bbed8d56..8e9e60b170f 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -81,7 +81,7 @@ PropertyEditorView::PropertyEditorView(QWidget *parent) : { m_qmlDir = PropertyEditorQmlBackend::propertyEditorResourcesPath(); - if (Utils::HostOsInfo().isMacHost()) + if (Utils::HostOsInfo::isMacHost()) m_updateShortcut = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_F3), m_stackedWidget); else m_updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F3), m_stackedWidget);