fix(cpn): ACCESS owner registration id validation (#2687)
* fix(cpn): ACCESS owner registration id validation (#2672) * Allow registration id for internal ISRM module * Always display owner id
This commit is contained in:
@@ -275,6 +275,10 @@ ui(new Ui::GeneralSetup)
|
||||
ui->pwrOnDelay->hide();
|
||||
}
|
||||
|
||||
QRegExp rx(CHAR_FOR_NAMES_REGEX);
|
||||
ui->registrationId->setValidator(new QRegExpValidator(rx, this));
|
||||
ui->registrationId->setMaxLength(REGISTRATION_ID_LEN);
|
||||
|
||||
setValues();
|
||||
|
||||
lock = false;
|
||||
@@ -460,7 +464,6 @@ void GeneralSetupPanel::setValues()
|
||||
ui->pwrOnDelay->setValue(2 - generalSettings.pwrOnSpeed);
|
||||
ui->pwrOffDelay->setValue(2 - generalSettings.pwrOffSpeed);
|
||||
|
||||
// TODO: only if ACCESS available??
|
||||
ui->registrationId->setText(generalSettings.registrationId);
|
||||
}
|
||||
|
||||
@@ -781,10 +784,7 @@ void GeneralSetupPanel::on_blAlarm_ChkB_stateChanged()
|
||||
|
||||
void GeneralSetupPanel::on_registrationId_editingFinished()
|
||||
{
|
||||
//copy ownerID back to generalSettings.registrationId
|
||||
QByteArray array = ui->registrationId->text().toLocal8Bit();
|
||||
strncpy(generalSettings.registrationId, array, 8);
|
||||
generalSettings.registrationId[8] = '\0';
|
||||
strncpy(generalSettings.registrationId, ui->registrationId->text().toLatin1(), REGISTRATION_ID_LEN);
|
||||
emit modified();
|
||||
}
|
||||
|
||||
|
||||
@@ -733,9 +733,6 @@
|
||||
</item>
|
||||
<item row="20" column="1">
|
||||
<widget class="QLineEdit" name="registrationId">
|
||||
<property name="inputMask">
|
||||
<string>nnnnnnNN</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>8</number>
|
||||
</property>
|
||||
@@ -1046,7 +1043,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item row="20" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="label_registrationId">
|
||||
<property name="text">
|
||||
<string>Owner Registration ID</string>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user