Set: Allow setting device nickname

This commit is contained in:
Chloe Marcec
2022-12-13 17:21:04 -05:00
committed by Liam
parent a4696285af
commit c5f519e1e4
9 changed files with 42 additions and 2 deletions

View File

@ -72,6 +72,8 @@ void ConfigureSystem::SetConfiguration() {
ui->custom_rtc_checkbox->setChecked(Settings::values.custom_rtc.has_value());
ui->custom_rtc_edit->setEnabled(Settings::values.custom_rtc.has_value());
ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time));
ui->device_name_edit->setText(
QString::fromUtf8(Settings::values.device_name.GetValue().c_str()));
if (Settings::IsConfiguringGlobal()) {
ui->combo_language->setCurrentIndex(Settings::values.language_index.GetValue());
@ -115,6 +117,8 @@ void ConfigureSystem::ApplyConfiguration() {
}
}
Settings::values.device_name = ui->device_name_edit->text().toStdString();
if (!enabled) {
return;
}