diff --git a/qubesmanager/create_new_vm.py b/qubesmanager/create_new_vm.py index 97bba22b..6e7fa52f 100644 --- a/qubesmanager/create_new_vm.py +++ b/qubesmanager/create_new_vm.py @@ -71,7 +71,7 @@ def __init__(self, qtapp, app, parent=None): allow_internal=False, allow_default=True, allow_none=True) 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.setFocus() diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 6cec676b..7d8931c4 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -263,7 +263,7 @@ def __init__(self, qt_app, qubes_app, parent=None): self.searchbox = SearchBox() 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.connect(self.table, QtCore.SIGNAL("itemSelectionChanged()"), diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index f71611e0..9de9baa0 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -294,7 +294,7 @@ def __init_basic_tab__(self): self.vmname.setText(self.vm.name) self.vmname.setValidator( QtGui.QRegExpValidator( - QtCore.QRegExp("[a-zA-Z0-9-]*", + QtCore.QRegExp("[a-zA-Z0-9_-]*", QtCore.Qt.CaseInsensitive), None)) self.vmname.setEnabled(False) self.rename_vm_button.setEnabled(not self.vm.is_running())