681 |
681 |
682 @param grpc flag indicating to compile as gRPC files |
682 @param grpc flag indicating to compile as gRPC files |
683 @type bool |
683 @type bool |
684 """ |
684 """ |
685 if self.__getCompilerCommand(grpc)[0] is not None: |
685 if self.__getCompilerCommand(grpc)[0] is not None: |
686 numProtos = len(self.project.pdata["PROTOCOLS"]) |
686 numProtos = len(self.project.getProjectData(dataKey="PROTOCOLS")) |
687 progress = EricProgressDialog( |
687 progress = EricProgressDialog( |
688 self.tr("Compiling Protocols..."), |
688 self.tr("Compiling Protocols..."), |
689 self.tr("Abort"), |
689 self.tr("Abort"), |
690 0, |
690 0, |
691 numProtos, |
691 numProtos, |
694 ) |
694 ) |
695 progress.setModal(True) |
695 progress.setModal(True) |
696 progress.setMinimumDuration(0) |
696 progress.setMinimumDuration(0) |
697 progress.setWindowTitle(self.tr("Protocols")) |
697 progress.setWindowTitle(self.tr("Protocols")) |
698 |
698 |
699 for prog, fn in enumerate(self.project.pdata["PROTOCOLS"]): |
699 for prog, fn in enumerate(self.project.getProjectData(dataKey="PROTOCOLS")): |
700 progress.setValue(prog) |
700 progress.setValue(prog) |
701 if progress.wasCanceled(): |
701 if progress.wasCanceled(): |
702 break |
702 break |
703 proc = self.__compileProto(fn, True, progress, grpc=grpc) |
703 proc = self.__compileProto(fn, True, progress, grpc=grpc) |
704 if proc is not None: |
704 if proc is not None: |