239 @param line number where the error occured (int) |
239 @param line number where the error occured (int) |
240 @param index the column where the error occured (int) |
240 @param index the column where the error occured (int) |
241 @param code the part of the code where the error occured (str) |
241 @param code the part of the code where the error occured (str) |
242 @param error the name of the error (str) |
242 @param error the name of the error (str) |
243 @param warnings a list of strings containing the warnings |
243 @param warnings a list of strings containing the warnings |
244 (marker, file name, line number, message) |
244 (marker, file name, line number, col, message) |
245 """ |
245 """ |
246 # Check if it's the requested file, otherwise ignore signal |
246 # Check if it's the requested file, otherwise ignore signal |
247 if fn != self.filename: |
247 if fn != self.filename: |
248 return |
248 return |
249 |
249 |
251 self.noResults = False |
251 self.noResults = False |
252 self.__createResultItem( |
252 self.__createResultItem( |
253 fname, line, index, error, code.strip(), False) |
253 fname, line, index, error, code.strip(), False) |
254 else: |
254 else: |
255 source = self.source.splitlines() |
255 source = self.source.splitlines() |
256 for warning in warnings: |
256 for marker, _fn, lineno, col, msg in warnings: |
257 self.noResults = False |
257 self.noResults = False |
258 scr_line = source[warning[2] - 1].strip() |
258 scr_line = source[lineno - 1].strip() |
259 self.__createResultItem( |
259 self.__createResultItem(_fn, lineno, col, msg, scr_line, True) |
260 warning[1], warning[2], 0, |
|
261 warning[3], scr_line, True) |
|
262 self.progress += 1 |
260 self.progress += 1 |
263 self.checkProgress.setValue(self.progress) |
261 self.checkProgress.setValue(self.progress) |
264 self.checkProgressLabel.setPath("") |
262 self.checkProgressLabel.setPath("") |
265 QApplication.processEvents() |
263 QApplication.processEvents() |
266 self.__resort() |
264 self.__resort() |