[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [partitionmanager] src/gui: Add a validator for LVM VG names. Restrict to alphanumeric and +-_.
From: Andrius_Å tikonas <andrius () stikonas ! eu>
Date: 2016-12-07 21:51:29
Message-ID: E1cEk7d-0006Lp-4X () code ! kde ! org
[Download RAW message or body]
Git commit 771c0ceaa2bfd5634f65e6e390733cec557e90de by Andrius Å tikonas.
Committed on 07/12/2016 at 21:51.
Pushed by stikonas into branch 'master'.
Add a validator for LVM VG names. Restrict to alphanumeric and +-_.
M +3 -0 src/gui/volumegroupdialog.cpp
https://commits.kde.org/partitionmanager/771c0ceaa2bfd5634f65e6e390733cec557e90de
diff --git a/src/gui/volumegroupdialog.cpp b/src/gui/volumegroupdialog.cpp
index a3fee52..cc57fa5 100644
--- a/src/gui/volumegroupdialog.cpp
+++ b/src/gui/volumegroupdialog.cpp
@@ -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"));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic