UI: Fixes for Qt 6.1

This commit is contained in:
Nodir Temirkhodjaev 2024-04-05 13:45:01 +03:00
parent 291efe4b27
commit 8945aed366
3 changed files with 11 additions and 2 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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));