10 |
10 |
11 import os |
11 import os |
12 import sys |
12 import sys |
13 |
13 |
14 from PyQt5.QtCore import pyqtSignal, pyqtSlot |
14 from PyQt5.QtCore import pyqtSignal, pyqtSlot |
15 from PyQt5.QtWidgets import QWidget, QHeaderView, QApplication, \ |
15 from PyQt5.QtWidgets import ( |
16 QDialogButtonBox, QTreeWidgetItem |
16 QWidget, QHeaderView, QApplication, QDialogButtonBox, QTreeWidgetItem |
|
17 ) |
17 |
18 |
18 from E5Gui.E5PathPicker import E5PathPickerModes |
19 from E5Gui.E5PathPicker import E5PathPickerModes |
19 |
20 |
20 from .Ui_FindFileNameDialog import Ui_FindFileNameDialog |
21 from .Ui_FindFileNameDialog import Ui_FindFileNameDialog |
21 |
22 |
111 patternFormat = fileExt and "{0}{1}{2}" or "{0}*{1}{2}" |
112 patternFormat = fileExt and "{0}{1}{2}" or "{0}*{1}{2}" |
112 fileNamePattern = patternFormat.format( |
113 fileNamePattern = patternFormat.format( |
113 fileName, os.extsep, fileExt and fileExt or '*') |
114 fileName, os.extsep, fileExt and fileExt or '*') |
114 |
115 |
115 searchPaths = [] |
116 searchPaths = [] |
116 if self.searchDirCheckBox.isChecked() and \ |
117 if ( |
117 self.searchDirPicker.text() != "": |
118 self.searchDirCheckBox.isChecked() and |
|
119 self.searchDirPicker.text() != "" |
|
120 ): |
118 searchPaths.append(self.searchDirPicker.text()) |
121 searchPaths.append(self.searchDirPicker.text()) |
119 if self.projectCheckBox.isChecked(): |
122 if self.projectCheckBox.isChecked(): |
120 searchPaths.append(self.project.ppath) |
123 searchPaths.append(self.project.ppath) |
121 if self.syspathCheckBox.isChecked(): |
124 if self.syspathCheckBox.isChecked(): |
122 searchPaths.extend(sys.path) |
125 searchPaths.extend(sys.path) |