mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 14:45:04 -06:00
Qt: trim whitespace from textinput before writing to config
This commit is contained in:
parent
a6e046c6c3
commit
93f5154429
@ -742,7 +742,12 @@ void emu_settings::EnhanceLineEdit(QLineEdit* edit, emu_settings_type type)
|
|||||||
|
|
||||||
connect(edit, &QLineEdit::textChanged, this, [type, this](const QString &text)
|
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]()
|
connect(this, &emu_settings::RestoreDefaultsSignal, edit, [this, edit, type]()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user