refact: Compatible with Qt 6.2

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe
2023-09-06 16:49:47 +08:00
committed by Comix
parent 34a10bddb1
commit 6561747c7d
4 changed files with 10 additions and 5 deletions

View File

@ -11,7 +11,8 @@
QStringList generateCommand(const QVariantMap &props) noexcept
{
std::vector<std::unique_ptr<LaunchOption>> options;
for (const auto &[key, value] : props.asKeyValueRange()) {
for (auto it = props.constKeyValueBegin(); it!= props.constKeyValueEnd(); ++it) {
const auto &[key, value] = *it;
if (key == setUserLaunchOption::key()) {
options.push_back(std::make_unique<setUserLaunchOption>(value));
} else if (key == setEnvLaunchOption::key()) {