--- a/eric6/Project/ProjectProtocolsBrowser.py Sun Apr 11 11:34:32 2021 +0200 +++ b/eric6/Project/ProjectProtocolsBrowser.py Sun Apr 11 12:38:16 2021 +0200 @@ -661,10 +661,9 @@ progress.setModal(True) progress.setMinimumDuration(0) progress.setWindowTitle(self.tr("Protocols")) - i = 0 - for fn in self.project.pdata["PROTOCOLS"]: - progress.setValue(i) + for prog, fn in enumerate(self.project.pdata["PROTOCOLS"]): + progress.setValue(prog) if progress.wasCanceled(): break proc = self.__compileProto(fn, True, progress, grpc=grpc) @@ -675,8 +674,6 @@ QApplication.processEvents() else: break - i += 1 - progress.setValue(numProtos) def __compileSelectedProtocols(self, grpc=False): @@ -699,10 +696,9 @@ progress.setModal(True) progress.setMinimumDuration(0) progress.setWindowTitle(self.tr("Protocols")) - i = 0 - for fn in files: - progress.setValue(i) + for prog, fn in enumerate(files): + progress.setValue(prog) if progress.wasCanceled(): break proc = self.__compileProto(fn, True, progress, grpc=grpc) @@ -713,8 +709,6 @@ QApplication.processEvents() else: break - i += 1 - progress.setValue(numProtos) def __configureProtobuf(self):