Fix "Code import wizard: python wrong function return"
umbrello/codeimport/pythonimport.{h,cpp} - At function skipBody add optional argument foundReturn of type bool*. If given then the variable pointed to will be set true if a 'return' statement was encountered while skipping. If no 'return' statement was encountered then the variable will be set to false. - In function parseStmt() handling of keyword "def" : - Move local srcIndex and call to op->setSourceCode to before the call to Import_Utils::insertMethod. - Define local foundReturn of type bool. - Define local QString bodyCode initialized to skipBody(&foundReturn). - Define local QString returnTypeName which is left empty if foundReturn is returned false and is set to "string" if foundReturn is returned true. - At call to Import_Utils::insertMethod provide returnTypeName as the return type argument. - At call to op->setSourceCode provide bodyCode as argument. BUG: 449297 FIXED-IN:2.33.80 (KDE releases 22.03.80)
parent
39a589a1
Loading
Loading
Pipeline
#131367
passed
with stage
in
15 minutes and 53 seconds
Loading
Please register or sign in to comment