浏览代码

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?
Jean-Philippe Ouellet 7 年之前
父节点
当前提交
6b3ef1dab2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      qubesmanager/main.py

+ 1 - 0
qubesmanager/main.py

@@ -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()"),