Merge remote-tracking branch 'qubesos/pr/25'

* qubesos/pr/25:
  Restrict VM search field to valid VM names
  Revert "Fix for UnicodeEncodeError in search"
This commit is contained in:
Marek Marczykowski-Górecki 2017-02-14 21:45:52 +01:00
commit ed8f889c92
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -353,6 +353,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()"),
@ -721,7 +722,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
@pyqtSlot(str)
def do_search(self, search):
self.search = unicode(search)
self.search = str(search)
self.showhide_vms()
self.set_table_geom_size()