Summary: | Python Code imports self parameter in operation | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | g2spot |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ralf.habacker |
Priority: | NOR | ||
Version: | 2.10.2 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | http://commits.kde.org/umbrello/de77ff0c13706fd2784e11a721be96dd97747f98 | Version Fixed In: | 4.13.3 |
Sentry Crash Report: | |||
Attachments: | ignore all 'self' parameters during import |
Description
g2spot
2013-07-17 08:13:33 UTC
Created attachment 86235 [details]
ignore all 'self' parameters during import
This will fix the dual self parameters after an import and export of python code.
Git commit b68bd35c944d3abee7a5f5d1c982f1cd144e765a by Oliver Kellogg. Committed on 29/05/2014 at 12:22. Pushed by okellogg into branch 'master'. Apply modified version of https://bugs.kde.org/attachment.cgi?id=86235 umbrello/codeimport/pythonimport.h - Add member m_isStatic of type bool defaulting to false. umbrello/codeimport/pythonimport.cpp function parseStmt() - Decode "@staticmethod" to set m_isStatic true. - In handling of keyword "def", - If first parameter is not named "self" then set m_isStatic true and add the parameter via Import_Utils::addMethodParameter(); else do not add the parameter. - At call to Import_Utils::insertMethod(), provide m_isStatic as argument `isStatic'. - Reset m_isStatic false after call to Import_Utils::insertMethod(). M +20 -2 umbrello/codeimport/pythonimport.cpp M +1 -0 umbrello/codeimport/pythonimport.h http://commits.kde.org/umbrello/b68bd35c944d3abee7a5f5d1c982f1cd144e765a Git commit de77ff0c13706fd2784e11a721be96dd97747f98 by Oliver Kellogg. Committed on 29/05/2014 at 12:22. Pushed by okellogg into branch 'KDE/4.13'. Apply modified version of https://bugs.kde.org/attachment.cgi?id=86235 umbrello/codeimport/pythonimport.h - Add member m_isStatic of type bool defaulting to false. umbrello/codeimport/pythonimport.cpp function parseStmt() - Decode "@staticmethod" to set m_isStatic true. - In handling of keyword "def", - If first parameter is not named "self" then set m_isStatic true and add the parameter via Import_Utils::addMethodParameter(); else do not add the parameter. - At call to Import_Utils::insertMethod(), provide m_isStatic as argument `isStatic'. - Reset m_isStatic false after call to Import_Utils::insertMethod(). M +20 -2 umbrello/codeimport/pythonimport.cpp M +1 -0 umbrello/codeimport/pythonimport.h http://commits.kde.org/umbrello/de77ff0c13706fd2784e11a721be96dd97747f98 |