Further cleanup of Datatypes content on programming language change
umbrello/uml.cpp function setGenerator - Followup to commit c7fdfefc: In case of non null m_codegen, - local UMLFolder *dtFolder is shorthand for m_doc->datatypeFolder(); - local UMLObjectList dataTypes acts as shorthand for dtFolder->containedObjects(); - local UMLObjectList::Iterator `end' is shorthand for entries.end(); - if argument `pl' is same as m_codegen->language() then - Local QStringList predefTypes acts as shorthand for m_codegen->defaultDatatypes(); - local Qt::CaseSensitivity `cs' is set to Qt::CaseSensitive if activeLanguageIsCaseSensitive() returns true, otherwise false; - iterate over dataTypes using UMLObjectList::Iterator `it': - If (*it)->name() is not found in predefTypes then call m_doc->removeUMLObject(*it). - Return m_codegen. This change restores uml.cpp commit ea25b643 but in a more refined way. It has been tested with the attachment at bug 336933, https://bugs.kde.org/attachment.cgi?id=87501 for which all expected classes are generated. - if argument `pl' differs from m_codegen->language() then iterate over dataTypes using UMLObjectList::Iterator `it', calling m_doc->removeUMLObject(*it) unconditionally.
parent
74c9c2d9
Please register or sign in to comment