Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py

changeset 3137
59d9f8c238f0
parent 3091
8239cae3f947
child 3160
209a07d7e401
equal deleted inserted replaced
3136:0ede9c1c7284 3137:59d9f8c238f0
59 self.__fileList = [] 59 self.__fileList = []
60 self.__project = None 60 self.__project = None
61 self.filterFrame.setVisible(False) 61 self.filterFrame.setVisible(False)
62 62
63 self.checkProgress.setVisible(False) 63 self.checkProgress.setVisible(False)
64 self.checkProgressLabel.setVisible(False)
65 self.checkProgressLabel.setMaximumWidth(600)
64 66
65 def __resort(self): 67 def __resort(self):
66 """ 68 """
67 Private method to resort the tree. 69 Private method to resort the tree.
68 """ 70 """
168 (codestring and len(py2files) == 1) or \ 170 (codestring and len(py2files) == 1) or \
169 (not codestring and len(py3files) + len(py2files) > 0): 171 (not codestring and len(py3files) + len(py2files) > 0):
170 self.checkProgress.setMaximum(len(py3files) + len(py2files)) 172 self.checkProgress.setMaximum(len(py3files) + len(py2files))
171 self.checkProgressLabel.setVisible( 173 self.checkProgressLabel.setVisible(
172 len(py3files) + len(py2files) > 1) 174 len(py3files) + len(py2files) > 1)
175 self.checkProgress.setVisible(
176 len(py3files) + len(py2files) > 1)
173 QApplication.processEvents() 177 QApplication.processEvents()
174 178
175 ignoreStarImportWarnings = \ 179 ignoreStarImportWarnings = \
176 Preferences.getFlakes("IgnoreStarImportWarnings") 180 Preferences.getFlakes("IgnoreStarImportWarnings")
177 181
178 # now go through all the files 182 # now go through all the files
179 progress = 0 183 progress = 0
180 for file in py3files + py2files: 184 for file in py3files + py2files:
181 self.checkProgress.setValue(progress) 185 self.checkProgress.setValue(progress)
186 self.checkProgressLabel.setPath(file)
182 QApplication.processEvents() 187 QApplication.processEvents()
183 self.__resort() 188 self.__resort()
184 189
185 if self.cancelled: 190 if self.cancelled:
186 return 191 return
263 self.__createResultItem( 268 self.__createResultItem(
264 warning[0], int(warning[1]), 0, 269 warning[0], int(warning[1]), 0,
265 warning[2], "", isWarning=True) 270 warning[2], "", isWarning=True)
266 progress += 1 271 progress += 1
267 self.checkProgress.setValue(progress) 272 self.checkProgress.setValue(progress)
273 self.checkProgressLabel.setPath("")
268 QApplication.processEvents() 274 QApplication.processEvents()
269 self.__resort() 275 self.__resort()
270 else: 276 else:
271 self.checkProgress.setMaximum(1) 277 self.checkProgress.setMaximum(1)
272 self.checkProgress.setValue(1) 278 self.checkProgress.setValue(1)
291 self.showButton.setEnabled(True) 297 self.showButton.setEnabled(True)
292 self.resultList.header().resizeSections(QHeaderView.ResizeToContents) 298 self.resultList.header().resizeSections(QHeaderView.ResizeToContents)
293 self.resultList.header().setStretchLastSection(True) 299 self.resultList.header().setStretchLastSection(True)
294 300
295 self.checkProgress.setVisible(False) 301 self.checkProgress.setVisible(False)
302 self.checkProgressLabel.setVisible(False)
296 303
297 def on_buttonBox_clicked(self, button): 304 def on_buttonBox_clicked(self, button):
298 """ 305 """
299 Private slot called by a button of the button box clicked. 306 Private slot called by a button of the button box clicked.
300 307

eric ide

mercurial