ソースを参照

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