2020-08-10 Fred Gleason <fredg@paravelsystems.com>

* Added a check in 'RDSvc::create()' to disallow creation of a
	service with a name containing whitespace.
	* Added whitespace to the set of banned characters for service names
	in the 'Add Service' dialog in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2020-08-10 13:17:27 -04:00
parent d4f76649e8
commit d433e3c631
12 changed files with 56 additions and 10 deletions

View File

@@ -21,9 +21,9 @@
#ifndef RDTEXTVALIDATOR_H
#define RDTEXTVALIDATOR_H
#include <vector>
#include <qvalidator.h>
#include <QChar>
#include <QList>
#include <QValidator>
class RDTextValidator : public QValidator
{
@@ -31,10 +31,12 @@ class RDTextValidator : public QValidator
RDTextValidator(QObject *parent=0,const char *name=0,bool allow_quote=false);
QValidator::State validate(QString &input,int &pos) const;
void addBannedChar(char c);
void addBannedChar(const QChar &c);
static QString stripString(QString str);
private:
std::vector<char> banned_chars;
QList<QChar> banned_chars;
// std::vector<char> banned_chars;
};