Fixed VM name validation in GUI tools (Create VM, Settings, Manager)
VM name validation in various places in Manager did not allow a perfectly legal '_' character. references QubesOS/qubes-issues#2422
This commit is contained in:
parent
0a44c931da
commit
3f0af4498c
@ -71,7 +71,7 @@ class NewVmDlg(QtGui.QDialog, Ui_NewVMDlg):
|
|||||||
allow_internal=False, allow_default=True, allow_none=True)
|
allow_internal=False, allow_default=True, allow_none=True)
|
||||||
|
|
||||||
self.name.setValidator(QtGui.QRegExpValidator(
|
self.name.setValidator(QtGui.QRegExpValidator(
|
||||||
QtCore.QRegExp("[a-zA-Z0-9-]*", QtCore.Qt.CaseInsensitive), None))
|
QtCore.QRegExp("[a-zA-Z0-9_-]*", QtCore.Qt.CaseInsensitive), None))
|
||||||
self.name.selectAll()
|
self.name.selectAll()
|
||||||
self.name.setFocus()
|
self.name.setFocus()
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
|
|
||||||
self.searchbox = SearchBox()
|
self.searchbox = SearchBox()
|
||||||
self.searchbox.setValidator(QtGui.QRegExpValidator(
|
self.searchbox.setValidator(QtGui.QRegExpValidator(
|
||||||
QtCore.QRegExp("[a-zA-Z0-9-]*", QtCore.Qt.CaseInsensitive), None))
|
QtCore.QRegExp("[a-zA-Z0-9_-]*", QtCore.Qt.CaseInsensitive), None))
|
||||||
self.searchContainer.addWidget(self.searchbox)
|
self.searchContainer.addWidget(self.searchbox)
|
||||||
|
|
||||||
self.connect(self.table, QtCore.SIGNAL("itemSelectionChanged()"),
|
self.connect(self.table, QtCore.SIGNAL("itemSelectionChanged()"),
|
||||||
|
@ -294,7 +294,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtGui.QDialog):
|
|||||||
self.vmname.setText(self.vm.name)
|
self.vmname.setText(self.vm.name)
|
||||||
self.vmname.setValidator(
|
self.vmname.setValidator(
|
||||||
QtGui.QRegExpValidator(
|
QtGui.QRegExpValidator(
|
||||||
QtCore.QRegExp("[a-zA-Z0-9-]*",
|
QtCore.QRegExp("[a-zA-Z0-9_-]*",
|
||||||
QtCore.Qt.CaseInsensitive), None))
|
QtCore.Qt.CaseInsensitive), None))
|
||||||
self.vmname.setEnabled(False)
|
self.vmname.setEnabled(False)
|
||||||
self.rename_vm_button.setEnabled(not self.vm.is_running())
|
self.rename_vm_button.setEnabled(not self.vm.is_running())
|
||||||
|
Loading…
Reference in New Issue
Block a user