Add a validator for LVM VG names. Restrict to alphanumeric and +-_.
This commit is contained in:
parent
d2b3f7344a
commit
771c0ceaa2
|
@ -74,6 +74,9 @@ VolumeGroupDialog::~VolumeGroupDialog()
|
|||
|
||||
void VolumeGroupDialog::setupDialog()
|
||||
{
|
||||
QRegExp re(QStringLiteral("[\\w-.+]+"));
|
||||
QRegExpValidator *validator = new QRegExpValidator(re, this);
|
||||
dialogWidget().vgName().setValidator(validator);
|
||||
dialogWidget().vgName().setText(targetName());
|
||||
|
||||
dialogWidget().volumeType().addItem(QStringLiteral("LVM"));
|
||||
|
|
Loading…
Reference in New Issue