681 argumentsList = self.__splitArgumentsTextToList(self.argumentsText) |
681 argumentsList = self.__splitArgumentsTextToList(self.argumentsText) |
682 if argumentsList is not None: |
682 if argumentsList is not None: |
683 self.hasInfo = True |
683 self.hasInfo = True |
684 self.__splitArgumentToNameTypeValue(argumentsList, quote, quoteReplace) |
684 self.__splitArgumentToNameTypeValue(argumentsList, quote, quoteReplace) |
685 |
685 |
686 functionName = ( |
686 self.functionName = ( |
687 text[: positionArgumentsStart - 1] |
687 text[: positionArgumentsStart - 1] |
688 .replace("async def ", "") |
688 .replace("async def ", "") |
689 .replace("def ", "") |
689 .replace("def ", "") |
690 ) |
690 ) |
691 if functionName == "__init__": |
691 if self.functionName == "__init__": |
692 self.functionType = "constructor" |
692 self.functionType = "constructor" |
693 elif functionName.startswith("__"): |
693 elif self.functionName.startswith("__"): |
694 if functionName.endswith("__"): |
694 if self.functionName.endswith("__"): |
695 self.visibility = "special" |
695 self.visibility = "special" |
696 else: |
696 else: |
697 self.visibility = "private" |
697 self.visibility = "private" |
698 elif functionName.startswith("_"): |
698 elif self.functionName.startswith("_"): |
699 self.visibility = "protected" |
699 self.visibility = "protected" |
700 else: |
700 else: |
701 self.visibility = "public" |
701 self.visibility = "public" |
|
702 |
|
703 if self.functionName.endswith("Event") or self.functionName in ("eventFilter",): |
|
704 self.eventHandler = True |
|
705 # Qt event handlers are protected |
|
706 self.visibility = "protected" |
|
707 elif self.functionName in ("event",): |
|
708 self.eventHandler = True |
702 |
709 |
703 def parseBody(self, text): |
710 def parseBody(self, text): |
704 """ |
711 """ |
705 Public method to parse the function body text. |
712 Public method to parse the function body text. |
706 |
713 |