2025-04-28 Fred Gleason <fredg@paravelsystems.com>

* Modified validator for new scheduler codes to use
	'QRegularExpressionValidator' in the 'Add Scheduler Code' dialog
	in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2025-04-28 11:36:54 -04:00
parent 4e58265b35
commit d166a188c9
2 changed files with 10 additions and 5 deletions

View File

@ -25048,3 +25048,7 @@
'DISTRO SPECIFIC NOTES' section of 'INSTALL'. 'DISTRO SPECIFIC NOTES' section of 'INSTALL'.
2025-04-28 Fred Gleason <fredg@paravelsystems.com> 2025-04-28 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up numerous 'no such signal' runtime errors. * Cleaned up numerous 'no such signal' runtime errors.
2025-04-28 Fred Gleason <fredg@paravelsystems.com>
* Modified validator for new scheduler codes to use
'QRegularExpressionValidator' in the 'Add Scheduler Code' dialog
in rdadmin(1).

View File

@ -21,7 +21,7 @@
#include <QMessageBox> #include <QMessageBox>
#include <QPushButton> #include <QPushButton>
//#include <QRegExpValidator> #include <QRegularExpressionValidator>
#include <rddb.h> #include <rddb.h>
#include <rdescape_string.h> #include <rdescape_string.h>
@ -45,11 +45,12 @@ AddSchedCode::AddSchedCode(QWidget *parent)
// //
d_code_edit=new QLineEdit(this); d_code_edit=new QLineEdit(this);
d_code_edit->setMaxLength(10); d_code_edit->setMaxLength(10);
/* QRegularExpressionValidator *code_validator=
QRegExpValidator *code_validator= new QRegularExpressionValidator(QRegularExpression("[-_a-z0-9 ]{1,10}",
new QRegExpValidator(QRegExp("[a-z0-9 ]{1,10}",Qt::CaseInsensitive),this); QRegularExpression::CaseInsensitiveOption),this);
// new QRegularExpressionValidator(QRegularExpression("[a-z0-9 ]{1,10}",
// QRegularExpression::CaseInsensitiveOption),this);
d_code_edit->setValidator(code_validator); d_code_edit->setValidator(code_validator);
*/
connect(d_code_edit,SIGNAL(textChanged(const QString &)), connect(d_code_edit,SIGNAL(textChanged(const QString &)),
this,SLOT(codeChangedData(const QString &))); this,SLOT(codeChangedData(const QString &)));
d_code_label=new QLabel(tr("New Code:"),this); d_code_label=new QLabel(tr("New Code:"),this);