eric7/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

branch
eric7
changeset 8943
23f9c7b9e18e
parent 8934
d3798915e0d2
child 9176
193da71cc417
equal deleted inserted replaced
8940:e91951ff3bbd 8943:23f9c7b9e18e
972 self.checkProgressLabel.setPath(self.tr("Preparing files...")) 972 self.checkProgressLabel.setPath(self.tr("Preparing files..."))
973 973
974 argumentsList = [] 974 argumentsList = []
975 for progress, filename in enumerate(self.files, start=1): 975 for progress, filename in enumerate(self.files, start=1):
976 self.checkProgress.setValue(progress) 976 self.checkProgress.setValue(progress)
977 QApplication.processEvents() 977 if time.monotonic() - self.__timenow > 0.01:
978 QApplication.processEvents()
979 self.__timenow = time.monotonic()
978 980
979 try: 981 try:
980 source, encoding = Utilities.readEncodedFile( 982 source, encoding = Utilities.readEncodedFile(
981 filename) 983 filename)
982 source = source.splitlines(True) 984 source = source.splitlines(True)
1005 argumentsList.append((filename, source, args)) 1007 argumentsList.append((filename, source, args))
1006 1008
1007 # reset the progress bar to the checked files 1009 # reset the progress bar to the checked files
1008 self.checkProgress.setValue(self.progress) 1010 self.checkProgress.setValue(self.progress)
1009 self.checkProgressLabel.setPath(self.tr("Transferring data...")) 1011 self.checkProgressLabel.setPath(self.tr("Transferring data..."))
1010 if time.monotonic() - self.__timenow > 0.01: 1012 QApplication.processEvents()
1011 QApplication.processEvents()
1012 self.__timenow = time.monotonic()
1013 1013
1014 self.__finished = False 1014 self.__finished = False
1015 self.styleCheckService.styleBatchCheck(argumentsList) 1015 self.styleCheckService.styleBatchCheck(argumentsList)
1016 1016
1017 def __batchFinished(self): 1017 def __batchFinished(self):

eric ide

mercurial