diff --git a/src/ui/form/opt/pages/optionspage.cpp b/src/ui/form/opt/pages/optionspage.cpp index 84b4c631..acda4886 100644 --- a/src/ui/form/opt/pages/optionspage.cpp +++ b/src/ui/form/opt/pages/optionspage.cpp @@ -774,7 +774,9 @@ QLayout *OptionsPage::setupEditShortcutLayout() m_labelShortcut = ControlUtil::createLabel(); m_editShortcut = new QKeySequenceEdit(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) m_editShortcut->setClearButtonEnabled(true); +#endif m_editShortcut->setFixedWidth(200); const auto onEditShortcut = [&](const QKeySequence &shortcut) { diff --git a/src/ui/manager/envmanager.cpp b/src/ui/manager/envmanager.cpp index c56523e5..0918409e 100644 --- a/src/ui/manager/envmanager.cpp +++ b/src/ui/manager/envmanager.cpp @@ -38,8 +38,8 @@ bool EnvManager::checkEnvironmentChanged() const #else auto it = m_cache.constBegin(); for (; it != m_cache.constEnd(); ++it) { - const auto key = it.key(); - const auto value = it.value(); + const auto &key = it.key(); + const auto &value = it.value(); #endif const auto newValue = readEnvVar(key); diff --git a/src/ui/util/conf/confutil.cpp b/src/ui/util/conf/confutil.cpp index 5e6128a3..0d123f76 100644 --- a/src/ui/util/conf/confutil.cpp +++ b/src/ui/util/conf/confutil.cpp @@ -796,7 +796,14 @@ void ConfUtil::writeApps(char **data, const appdata_map_t &appsMap, bool useHead *offp++ = 0; } +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) for (const auto &[kernelPath, appData] : appsMap.asKeyValueRange()) { +#else + auto it = appsMap.constBegin(); + for (; it != appsMap.constEnd(); ++it) { + const auto &kernelPath = it.key(); + const auto &appData = it.value(); +#endif const int kernelPathSize = kernelPath.size(); const quint16 appPathLen = quint16(kernelPathSize * sizeof(wchar_t));