Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py

changeset 3091
8239cae3f947
parent 3064
2e7054d62218
child 3137
59d9f8c238f0
child 3142
55030c09e142
equal deleted inserted replaced
3090:3d3b4cb0dfc3 3091:8239cae3f947
57 self.__lastFileItem = None 57 self.__lastFileItem = None
58 58
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
63 self.checkProgress.setVisible(False)
62 64
63 def __resort(self): 65 def __resort(self):
64 """ 66 """
65 Private method to resort the tree. 67 Private method to resort the tree.
66 """ 68 """
136 138
137 self.cancelled = False 139 self.cancelled = False
138 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) 140 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
139 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) 141 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True)
140 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 142 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
143 self.checkProgress.setVisible(True)
141 QApplication.processEvents() 144 QApplication.processEvents()
142 145
143 self.__clearErrors() 146 self.__clearErrors()
144 147
145 if isinstance(fn, list): 148 if isinstance(fn, list):
163 166
164 if (codestring and len(py3files) == 1) or \ 167 if (codestring and len(py3files) == 1) or \
165 (codestring and len(py2files) == 1) or \ 168 (codestring and len(py2files) == 1) or \
166 (not codestring and len(py3files) + len(py2files) > 0): 169 (not codestring and len(py3files) + len(py2files) > 0):
167 self.checkProgress.setMaximum(len(py3files) + len(py2files)) 170 self.checkProgress.setMaximum(len(py3files) + len(py2files))
171 self.checkProgressLabel.setVisible(
172 len(py3files) + len(py2files) > 1)
168 QApplication.processEvents() 173 QApplication.processEvents()
169 174
170 ignoreStarImportWarnings = \ 175 ignoreStarImportWarnings = \
171 Preferences.getFlakes("IgnoreStarImportWarnings") 176 Preferences.getFlakes("IgnoreStarImportWarnings")
172 177
285 else: 290 else:
286 self.showButton.setEnabled(True) 291 self.showButton.setEnabled(True)
287 self.resultList.header().resizeSections(QHeaderView.ResizeToContents) 292 self.resultList.header().resizeSections(QHeaderView.ResizeToContents)
288 self.resultList.header().setStretchLastSection(True) 293 self.resultList.header().setStretchLastSection(True)
289 294
295 self.checkProgress.setVisible(False)
296
290 def on_buttonBox_clicked(self, button): 297 def on_buttonBox_clicked(self, button):
291 """ 298 """
292 Private slot called by a button of the button box clicked. 299 Private slot called by a button of the button box clicked.
293 300
294 @param button button that was clicked (QAbstractButton) 301 @param button button that was clicked (QAbstractButton)

eric ide

mercurial