MCPcopy Create free account
hub / github.com/deskflow/deskflow / ScreenNameValidator

Method ScreenNameValidator

src/lib/gui/validators/ScreenNameValidator.cpp:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace validators {
19
20ScreenNameValidator::ScreenNameValidator(QLineEdit *lineEdit, ValidationError *error, const ScreenList *pScreens)
21 : LineEditValidator(lineEdit, error)
22{
23 addValidator(std::make_unique<EmptyStringValidator>(tr("Computer name cannot be empty")));
24 addValidator(std::make_unique<SpacesValidator>(tr("Computer name cannot contain spaces")));
25 addValidator(std::make_unique<ComputerNameValidator>(tr("Contains invalid characters or is too long")));
26 addValidator(
27 std::make_unique<ScreenDuplicationsValidator>(
28 tr("A computer with this name already exists"), lineEdit ? lineEdit->text() : "", pScreens
29 )
30 );
31}
32
33} // namespace validators

Callers

nothing calls this directly

Calls 1

textMethod · 0.45

Tested by

no test coverage detected