[umbrello] [Bug 449462] Python class functions return value wrong in class widget

"Oliver Kellogg" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=449462

Oliver Kellogg <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |2.33.80 (KDE releases
                   |                            |22.03.80)
      Latest Commit|                            |https://invent.kde.org/sdk/
                   |                            |umbrello/commit/71d1bfab866
                   |                            |62c976c6e23dcc3b9cad47e324c
                   |                            |81
         Resolution|---                         |FIXED
             Status|REPORTED                    |RESOLVED

--- Comment #1 from Oliver Kellogg <[email protected]> ---
Git commit 71d1bfab86662c976c6e23dcc3b9cad47e324c81 by Oliver Kellogg.
Committed on 01/02/2022 at 22:22.
Pushed by okellogg into branch 'master'.

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.
FIXED-IN:2.33.80 (KDE releases 22.03.80)

M  +11   -0    umbrello/codeimport/nativeimportbase.cpp
M  +2    -1    umbrello/codeimport/nativeimportbase.h
M  +73   -20   umbrello/codeimport/pythonimport.cpp
M  +2    -2    umbrello/codeimport/pythonimport.h

https://invent.kde.org/sdk/umbrello/commit/71d1bfab86662c976c6e23dcc3b9cad47e324c81

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.