Restrict VM search field to valid VM names

Properly fixes https://github.com/QubesOS/qubes-issues/issues/2562

This regex is starting to get duplicated in too many places...
Maybe it belongs in core somewhere?
This commit is contained in:
Jean-Philippe Ouellet 2017-02-13 04:36:35 -05:00
parent b2bcc00e1d
commit 6b3ef1dab2
No known key found for this signature in database
GPG Key ID: 4747332C27533622

View File

@ -351,6 +351,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
self.blk_watch_thread.start()
self.searchbox = SearchBox()
self.searchbox.setValidator(QRegExpValidator(QRegExp("[a-zA-Z0-9-]*", Qt.CaseInsensitive), None))
self.searchContainer.addWidget(self.searchbox)
self.connect(self.table, SIGNAL("itemSelectionChanged()"),