Qt: Remove usage of QString where possible for settings
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "memorycardsettingswidget.h"
|
||||
#include "common/string_util.h"
|
||||
#include "core/controller.h"
|
||||
#include "core/settings.h"
|
||||
#include "inputbindingwidgets.h"
|
||||
@@ -65,15 +66,15 @@ void MemoryCardSettingsWidget::createPortSettingsUi(int index, PortSettingsUI* u
|
||||
|
||||
const MemoryCardType default_value = (index == 0) ? MemoryCardType::PerGameTitle : MemoryCardType::None;
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(
|
||||
m_host_interface, ui->memory_card_type, QStringLiteral("MemoryCards"), QStringLiteral("Card%1Type").arg(index + 1),
|
||||
m_host_interface, ui->memory_card_type, "MemoryCards", StringUtil::StdStringFromFormat("Card%dType", index + 1),
|
||||
&Settings::ParseMemoryCardTypeName, &Settings::GetMemoryCardTypeName, default_value);
|
||||
ui->layout->addWidget(new QLabel(tr("Memory Card Type:"), ui->container));
|
||||
ui->layout->addWidget(ui->memory_card_type);
|
||||
|
||||
QHBoxLayout* memory_card_layout = new QHBoxLayout();
|
||||
ui->memory_card_path = new QLineEdit(ui->container);
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(m_host_interface, ui->memory_card_path,
|
||||
QStringLiteral("MemoryCards"), QStringLiteral("Card%1Path").arg(index + 1));
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(m_host_interface, ui->memory_card_path, "MemoryCards",
|
||||
StringUtil::StdStringFromFormat("Card%dPath", index + 1));
|
||||
memory_card_layout->addWidget(ui->memory_card_path);
|
||||
|
||||
QPushButton* memory_card_path_browse = new QPushButton(tr("Browse..."), ui->container);
|
||||
|
||||
Reference in New Issue
Block a user