mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Qt: trim whitespace from textinput before writing to config
This commit is contained in:
parent
a6e046c6c3
commit
93f5154429
1 changed files with 6 additions and 1 deletions
|
@ -742,7 +742,12 @@ void emu_settings::EnhanceLineEdit(QLineEdit* edit, emu_settings_type type)
|
|||
|
||||
connect(edit, &QLineEdit::textChanged, this, [type, this](const QString &text)
|
||||
{
|
||||
SetSetting(type, sstr(text));
|
||||
const QString trimmed = text.trimmed();
|
||||
if (trimmed.size() != text.size())
|
||||
{
|
||||
cfg_log.warning("EnhanceLineEdit '%s' input was trimmed", cfg_adapter::get_setting_name(type));
|
||||
}
|
||||
SetSetting(type, sstr(trimmed));
|
||||
});
|
||||
|
||||
connect(this, &emu_settings::RestoreDefaultsSignal, edit, [this, edit, type]()
|
||||
|
|
Loading…
Add table
Reference in a new issue