92 """ |
92 """ |
93 Private slot to handle the search. |
93 Private slot to handle the search. |
94 """ |
94 """ |
95 fileName = self.fileNameEdit.text() |
95 fileName = self.fileNameEdit.text() |
96 if not fileName: |
96 if not fileName: |
|
97 self.fileList.clear() |
97 return |
98 return |
98 fileExt = self.fileExtEdit.text() |
99 fileExt = self.fileExtEdit.text() |
|
100 if not fileExt and Utilities.isWindowsPlatform(): |
|
101 self.fileList.clear() |
|
102 return |
|
103 |
99 patternFormat = fileExt and "{0}{1}{2}*" or "{0}*{1}{2}" |
104 patternFormat = fileExt and "{0}{1}{2}*" or "{0}*{1}{2}" |
100 fileNamePattern = patternFormat.format(fileName, os.extsep, |
105 fileNamePattern = patternFormat.format(fileName, os.extsep, |
101 fileExt and fileExt or '*') |
106 fileExt and fileExt or '*') |
102 |
107 |
103 searchPaths = [] |
108 searchPaths = [] |
104 if self.searchDirCheckBox.isChecked() and \ |
109 if self.searchDirCheckBox.isChecked() and \ |
105 self.searchDirEdit.text() != "": |
110 self.searchDirEdit.text() != "": |
106 searchPaths.append(self.searchDirEdit.text()) |
111 searchPaths.append(self.searchDirEdit.text()) |
107 if self.projectCheckBox.isChecked(): |
112 if self.projectCheckBox.isChecked(): |
108 searchPaths.append(self.project.ppath) |
113 searchPaths.append(self.project.ppath) |
109 if self.syspathCheckBox.isChecked(): |
114 if self.syspathCheckBox.isChecked(): |
110 searchPaths.extend(sys.path) |
115 searchPaths.extend(sys.path) |
111 |
116 |
112 found = False |
117 found = False |
113 self.fileList.clear() |
118 self.fileList.clear() |
114 locations = {} |
119 locations = {} |
115 self.shouldStop = False |
120 self.shouldStop = False |
116 self.stopButton.setEnabled(True) |
121 self.stopButton.setEnabled(True) |