166 |
166 |
167 @param fn file or list of files or directory to show |
167 @param fn file or list of files or directory to show |
168 the maintainability index for |
168 the maintainability index for |
169 @type str or list of str |
169 @type str or list of str |
170 """ |
170 """ |
|
171 self.__errorItem = None |
|
172 self.resultList.clear() |
171 self.cancelled = False |
173 self.cancelled = False |
172 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
174 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
173 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) |
175 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) |
174 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
176 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
175 QApplication.processEvents() |
177 QApplication.processEvents() |
246 self.source = Utilities.normalizeCode(self.source) |
248 self.source = Utilities.normalizeCode(self.source) |
247 except (UnicodeError, IOError) as msg: |
249 except (UnicodeError, IOError) as msg: |
248 self.__createErrorItem(self.filename, str(msg).rstrip()) |
250 self.__createErrorItem(self.filename, str(msg).rstrip()) |
249 self.progress += 1 |
251 self.progress += 1 |
250 # Continue with next file |
252 # Continue with next file |
251 self.rawMetrics() |
253 self.maintainabilityIndex() |
252 return |
254 return |
253 |
255 |
254 self.__finished = False |
256 self.__finished = False |
255 self.radonService.maintainabilityIndex( |
257 self.radonService.maintainabilityIndex( |
256 None, self.filename, self.source) |
258 None, self.filename, self.source) |