11 |
11 |
12 import os |
12 import os |
13 import fnmatch |
13 import fnmatch |
14 |
14 |
15 from PyQt5.QtCore import pyqtSlot, Qt, QTimer |
15 from PyQt5.QtCore import pyqtSlot, Qt, QTimer |
16 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem, \ |
16 from PyQt5.QtWidgets import ( |
17 QApplication, QHeaderView |
17 QDialog, QDialogButtonBox, QTreeWidgetItem, QApplication, QHeaderView |
|
18 ) |
18 |
19 |
19 from E5Gui.E5Application import e5App |
20 from E5Gui.E5Application import e5App |
20 |
21 |
21 from .Ui_TabnannyDialog import Ui_TabnannyDialog |
22 from .Ui_TabnannyDialog import Ui_TabnannyDialog |
22 |
23 |
354 Private slot to start a code metrics run. |
355 Private slot to start a code metrics run. |
355 """ |
356 """ |
356 fileList = self.__fileList[:] |
357 fileList = self.__fileList[:] |
357 |
358 |
358 filterString = self.excludeFilesEdit.text() |
359 filterString = self.excludeFilesEdit.text() |
359 if "ExcludeFiles" not in self.__data or \ |
360 if ( |
360 filterString != self.__data["ExcludeFiles"]: |
361 "ExcludeFiles" not in self.__data or |
|
362 filterString != self.__data["ExcludeFiles"] |
|
363 ): |
361 self.__data["ExcludeFiles"] = filterString |
364 self.__data["ExcludeFiles"] = filterString |
362 self.__project.setData("CHECKERSPARMS", "Tabnanny", self.__data) |
365 self.__project.setData("CHECKERSPARMS", "Tabnanny", self.__data) |
363 filterList = [f.strip() for f in filterString.split(",") |
366 filterList = [f.strip() for f in filterString.split(",") |
364 if f.strip()] |
367 if f.strip()] |
365 if filterList: |
368 if filterList: |
366 for fileFilter in filterList: |
369 for fileFilter in filterList: |
367 fileList = \ |
370 fileList = [ |
368 [f for f in fileList if not fnmatch.fnmatch(f, fileFilter)] |
371 f for f in fileList if not fnmatch.fnmatch(f, fileFilter) |
|
372 ] |
369 |
373 |
370 self.resultList.clear() |
374 self.resultList.clear() |
371 self.noResults = True |
375 self.noResults = True |
372 self.cancelled = False |
376 self.cancelled = False |
373 self.start(fileList) |
377 self.start(fileList) |