فهرست منبع

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