[umbrello] [Bug 358293] C++ Code Generation Settings don't change anything
Oliver Kellogg
bugzilla_noreply at kde.org
Thu Dec 29 15:50:47 GMT 2022
https://bugs.kde.org/show_bug.cgi?id=358293
--- Comment #4 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 5dc9f9c172376a4276eec1c153c2c241125f999c by Oliver Kellogg.
Committed on 29/12/2022 at 15:49.
Pushed by okellogg into branch 'master'.
1. Apply patch https://bugs.kde.org/attachment.cgi?id=96895 with review
comments by Ralf Habacker addressed.
2. Fix generation of section comments:
- In umbrello/umbrello.kcfg group "Code Generation" change Bool
forceSections to writeSectionComments of type
CodeGenerationPolicy::WriteSectionCommentsPolicy.
- In umbrello/optionstate.h class CodeGenerationState change member
forceSections to writeSectionComments of type
CodeGenerationPolicy::WriteSectionCommentsPolicy.
- In umbrello/codegenerators/codegenerationpolicy.{h,cpp},
- add enum WriteSectionCommentsPolicy with values None,
WhenNonEmpty, Always;
- rename accessors {set,get}CodeVerboseSectionComments handling
bool argument to {set,get}SectionCommentsPolicy handling arg of
type WriteSectionCommentsPolicy, and manipulating
Settings::optionState().codeGenerationState.writeSectionComments
in lieu of the former forceSections;
- change member `bool m_codeVerboseSectionComments` to
`WriteSectionCommentsPolicy m_sectionCommentsPolicy`.
- In umbrello/codegenerators/codegenerationpolicy.cpp adjust
functions setDefaults and writeConfig to the UmbrelloSettings
switchover from forceSections() to writeSectionComments().
- In umbrello/codegenwizard/codegenoptionspage.ui change QCheckBox
ui_forceSections to QComboBox ui_writeSectionComments with values
"None", "When section is non empty", "Always".
- In umbrello/codegenwizard/codegenoptionspage.cpp adjust constructor
and function apply() to the codegenoptionspage.ui change.
- In umbrello/codegenerators/codegenerator.{h,cpp},
- change setForceSections(bool) to setSectionCommentPolicy with arg
of type CodeGenerationPolicy::WriteSectionCommentsPolicy calling
UMLApp::app()->commonPolicy()->setSectionCommentsPolicy(arg);
- at getter forceSections() add TODO remark about changing return
type to CodeGenerationPolicy::WriteSectionCommentsPolicy.
- In umbrello/codegenerators/cpp/cppwriter.cpp :
- Move setting of m_indentLevel from function writeHeaderFile to
writeClassDecl so that class level comments are generated without
indentation.
- In functions writeSourceFile, writeAttributeDecls,
writeAttributeMethods, writeConstructorDecls,
writeConstructorMethods,
- change test of forceDoc() to forceSections() when deciding
whether to write section comments;
- on generating section comments, change
writeComment(QStringLiteral(" "), indnt, stream)
to
writeBlankLine(stream)
in order to avoid ugly empty comments /* */ in multi line
comment mode.
- In function writeHeaderAttributeAccessorMethods simplify call to
writeAttributeMethods() by factoring the effective visibility
into local `vis`.
M +17 -14 umbrello/codegenerators/codegenerationpolicy.cpp
M +4 -3 umbrello/codegenerators/codegenerationpolicy.h
M +71 -4 umbrello/codegenerators/codegenerator.cpp
M +6 -2 umbrello/codegenerators/codegenerator.h
M +57 -51 umbrello/codegenerators/cpp/cppwriter.cpp
M +3 -2 umbrello/codegenwizard/codegenoptionspage.cpp
M +92 -21 umbrello/codegenwizard/codegenoptionspage.ui
M +2 -2 umbrello/optionstate.h
M +9 -4 umbrello/umbrello.kcfg
https://invent.kde.org/sdk/umbrello/commit/5dc9f9c172376a4276eec1c153c2c241125f999c
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list