diff --git a/ChangeLog b/ChangeLog index 00cf7b90..94151afa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25048,3 +25048,7 @@ 'DISTRO SPECIFIC NOTES' section of 'INSTALL'. 2025-04-28 Fred Gleason * Cleaned up numerous 'no such signal' runtime errors. +2025-04-28 Fred Gleason + * Modified validator for new scheduler codes to use + 'QRegularExpressionValidator' in the 'Add Scheduler Code' dialog + in rdadmin(1). diff --git a/rdadmin/add_schedcodes.cpp b/rdadmin/add_schedcodes.cpp index 3273e554..6560e706 100644 --- a/rdadmin/add_schedcodes.cpp +++ b/rdadmin/add_schedcodes.cpp @@ -21,7 +21,7 @@ #include #include -//#include +#include #include #include @@ -45,11 +45,12 @@ AddSchedCode::AddSchedCode(QWidget *parent) // d_code_edit=new QLineEdit(this); d_code_edit->setMaxLength(10); - /* - QRegExpValidator *code_validator= - new QRegExpValidator(QRegExp("[a-z0-9 ]{1,10}",Qt::CaseInsensitive),this); + QRegularExpressionValidator *code_validator= + new QRegularExpressionValidator(QRegularExpression("[-_a-z0-9 ]{1,10}", + QRegularExpression::CaseInsensitiveOption),this); + // new QRegularExpressionValidator(QRegularExpression("[a-z0-9 ]{1,10}", + // QRegularExpression::CaseInsensitiveOption),this); d_code_edit->setValidator(code_validator); - */ connect(d_code_edit,SIGNAL(textChanged(const QString &)), this,SLOT(codeChangedData(const QString &))); d_code_label=new QLabel(tr("New Code:"),this);