validate VM name also at GUI level (#656)
This commit is contained in:
parent
8d7ae00b2a
commit
d0eb5a2fd5
@ -83,6 +83,7 @@ class NewVmDlg (QDialog, Ui_NewVMDlg):
|
||||
self.template_name.insertItem(i, vm.name)
|
||||
self.template_name.setCurrentIndex(default_index)
|
||||
|
||||
self.vmname.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9-]*", Qt.CaseInsensitive), None))
|
||||
self.vmname.selectAll()
|
||||
self.vmname.setFocus()
|
||||
|
||||
|
@ -189,6 +189,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
||||
|
||||
def __init_basic_tab__(self):
|
||||
self.vmname.setText(self.vm.name)
|
||||
self.vmname.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9-]*", Qt.CaseInsensitive), None))
|
||||
|
||||
#self.qvm_collection.lock_db_for_reading()
|
||||
#self.qvm_collection.load()
|
||||
|
Loading…
Reference in New Issue
Block a user