Fix "Python class functions return value wrong in class widget"
umbrello/codeimport/nativeimportbase.{h,cpp} - New function current() acts as shorthand for m_source[m_srcIndex]. umbrello/codeimport/pythonimport.{h,cpp} - At function skipBody change type of argument foundReturn to Uml::PrimitiveTypes::Enum. For details see function documentation. umbrello/codeimport/pythonimport.cpp - In function fillSource, if first character is '-' then - if next character is '>' then append type hint token in m_source and shift the loop start index to 2; - else if next character is a digit then put the two characters to lexeme (start of negative number) and shift loop start index to 2. - In function skipBody handling of token "return" decode following token into one of the Uml::PrimitiveTypes::Enum values Boolean, Integer, Real, or String. If no "return" statement is encountered then set *foundReturn to Reserved. - In functions parseInitializer and parseMethodParameters, on handling type string use Python type "str". - In function parseStmt, if type hint exists then set returnTypeName from the type hint; otherwise decode foundReturn as returned by skipBody() to returnTypeName. BUG: 449462 FIXED-IN:2.33.80 (KDE releases 22.03.80)
Please register or sign in to comment