Fix regexp++.

This commit is contained in:
Andrius Štikonas 2017-10-06 23:48:52 +01:00
parent e77567f768
commit f34733e824
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ void VolumeGroupDialog::setupDialog()
/* LVM Volume group name can consists of: letters numbers _ . - +
* It cannot start with underscore _ and must not be equal to . or .. or any entry in /dev/
* QLineEdit accepts QValidator::Intermediate, so we just disable . at the beginning */
QRegularExpression re(QStringLiteral(R"(^(?!_|.)[\w\-.+]+)"));
QRegularExpression re(QStringLiteral(R"(^(?!_|\.)[\w\-.+]+)"));
QRegularExpressionValidator *validator = new QRegularExpressionValidator(re, this);
dialogWidget().vgName().setValidator(validator);
dialogWidget().vgName().setText(targetName());