qt: use `split()` instead of `splitRef()`, use QStringView with Qt 6 in ControlbarProfileModel

QStringView is available on Qt 5.12, but lacks the split() method
that is used here.
This commit is contained in:
Fatih Uzunoglu 2024-03-21 16:45:22 +02:00 committed by Jean-Baptiste Kempf
parent cbd2cf1d26
commit 396916a175
1 changed files with 5 additions and 0 deletions

View File

@ -674,7 +674,12 @@ bool ControlbarProfileModel::reload()
if (modelValue.isEmpty())
continue;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const auto val = modelValue.splitRef(SETTINGS_PROFILE_SEPARATOR);
#else
QStringView modelValueStringView(modelValue);
const auto val = modelValueStringView.split(SETTINGS_PROFILE_SEPARATOR);
#endif
if (val.isEmpty())
continue;