mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
(Qt) Refactoring the QVariant constructting (#17199)
This commit is contained in:
parent
3e2f0131ae
commit
022288a925
@ -1197,12 +1197,7 @@ void CoreOptionsDialog::buildLayout()
|
||||
}
|
||||
|
||||
for (k = 0; k < option->vals->size; k++)
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 0, 0))
|
||||
combo_box->addItem(option->vals->elems[k].data, QVariant::fromValue(option->key));
|
||||
#else
|
||||
combo_box->addItem(option->vals->elems[k].data, option->key);
|
||||
#endif
|
||||
|
||||
combo_box->addItem(option->vals->elems[k].data, QVariant::fromValue(QString(option->key)));
|
||||
|
||||
combo_box->setCurrentText(val);
|
||||
combo_box->setProperty("default_index",
|
||||
|
@ -3111,13 +3111,8 @@ void MainWindow::setCoreActions()
|
||||
if (!found_existing)
|
||||
{
|
||||
QVariantMap comboBoxMap;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
comboBoxMap["core_name"] = QVariant::fromValue(coreInfo->core_name);
|
||||
comboBoxMap["core_path"] = QVariant::fromValue(coreInfo->path);
|
||||
#else
|
||||
comboBoxMap["core_name"] = coreInfo->core_name;
|
||||
comboBoxMap["core_path"] = coreInfo->path;
|
||||
#endif
|
||||
comboBoxMap["core_name"] = QVariant::fromValue(QString(coreInfo->core_name));
|
||||
comboBoxMap["core_path"] = QVariant::fromValue(QString(coreInfo->path));
|
||||
comboBoxMap["core_selection"] = CORE_SELECTION_PLAYLIST_DEFAULT;
|
||||
m_launchWithComboBox->addItem(coreInfo->core_name, QVariant::fromValue(comboBoxMap));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user