[umbrello] [Bug 368282] Make type casting more robust

Ralf Habacker via KDE Bugzilla bugzilla_noreply at kde.org
Tue Sep 6 15:00:20 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=368282

--- Comment #3 from Ralf Habacker <ralf.habacker at freenet.de> ---
Git commit dd847f1576b37f9da31df51084fa3dda243ccc3c by Ralf Habacker.
Committed on 06/09/2016 at 15:00.
Pushed by habacker into branch 'master'.

Replace usage of UMLObject::m_pUMLPackage by QObject member 'parent' through
new method umlParent().

In the past UMLObject::m_pUMLPackage has been used in some classes,
while other uses the QObject class member 'parent'. This commit unify
both approaches by using QObject class member 'parent' in all classes.

class UMLObject now has two new functions setUMLParent() and umlParent()
to provides a UMLObject based interface to the parent uml object;
method umlPackage() is now a shortcut of umlParent()->asUMLPackage().
Reviewed-by: aaron.nottbeck at sag.eu

M  +1    -1    umbrello/codegenerators/ada/adawriter.cpp
M  +1    -1    umbrello/codeimport/import_utils.cpp
M  +1    -1    umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
M  +1    -1    umbrello/dialogs/umloperationdialog.cpp
M  +1    -1    umbrello/dialogs/umluniqueconstraintdialog.cpp
M  +3    -3    umbrello/dialogs/widgets/umldatatypewidget.cpp
M  +2    -2    umbrello/model_utils.cpp
M  +4    -4    umbrello/refactoring/refactoringassistant.cpp
M  +3    -3    umbrello/umldoc.cpp
M  +2    -2    umbrello/umllistview.cpp
M  +6    -6    umbrello/umllistviewitem.cpp
M  +9    -9    umbrello/umlmodel/association.cpp
M  +6    -6    umbrello/umlmodel/attribute.cpp
M  +1    -1    umbrello/umlmodel/checkconstraint.cpp
M  +3    -5    umbrello/umlmodel/classifierlistitem.cpp
M  +2    -2    umbrello/umlmodel/entity.cpp
M  +1    -1    umbrello/umlmodel/entityattribute.cpp
M  +1    -1    umbrello/umlmodel/enumliteral.cpp
M  +2    -2    umbrello/umlmodel/folder.cpp
M  +4    -4    umbrello/umlmodel/foreignkeyconstraint.cpp
M  +4    -4    umbrello/umlmodel/operation.cpp
M  +1    -1    umbrello/umlmodel/template.cpp
M  +50   -24   umbrello/umlmodel/umlobject.cpp
M  +4    -2    umbrello/umlmodel/umlobject.h
M  +8    -7    umbrello/umlmodel/uniqueconstraint.cpp
M  +3    -3    umbrello/umlwidgets/associationwidget.cpp
M  +1    -1    umbrello/umlwidgets/linkwidget.cpp

http://commits.kde.org/umbrello/dd847f1576b37f9da31df51084fa3dda243ccc3c

--- Comment #2 from Ralf Habacker <ralf.habacker at freenet.de> ---
Git commit fa3f51e764c4296c81454f25b340d00241f172d3 by Ralf Habacker.
Committed on 06/09/2016 at 14:59.
Pushed by habacker into branch 'master'.

Fix QPointer related dynamic_casts to use asUML... wrapper().
Reviewed-by: aaron.nottbeck at sag.eu

M  +5    -5    umbrello/umlmodel/classifier.cpp
M  +1    -1    umbrello/umlmodel/classifierlistitem.cpp
M  +2    -2    umbrello/umlwidgets/artifactwidget.cpp
M  +8    -8    umbrello/umlwidgets/associationwidget.cpp
M  +1    -1    umbrello/umlwidgets/categorywidget.cpp
M  +1    -1    umbrello/umlwidgets/classifierwidget.cpp
M  +3    -3    umbrello/umlwidgets/componentwidget.cpp
M  +8    -8    umbrello/umlwidgets/entitywidget.cpp
M  +4    -4    umbrello/umlwidgets/enumwidget.cpp
M  +1    -1    umbrello/umlwidgets/messagewidget.cpp

http://commits.kde.org/umbrello/fa3f51e764c4296c81454f25b340d00241f172d3

--- Comment #1 from Ralf Habacker <ralf.habacker at freenet.de> ---
Git commit a5f92b67494666e4e6779b1f2443b1a1df2b031d by Ralf Habacker.
Committed on 06/09/2016 at 14:59.
Pushed by habacker into branch 'master'.

Convert casts in UML model classes to use related casting methods.
Reviewed-by: aaron.nottbeck at sag.eu

M  +7    -7    umbrello/clipboard/umlclipboard.cpp
M  +1    -1    umbrello/clipboard/umldragdata.cpp
M  +2    -2    umbrello/codegenerators/ada/adawriter.cpp
M  +2    -2    umbrello/codegenerators/advancedcodegenerator.cpp
M  +1    -1    umbrello/codegenerators/classifiercodedocument.cpp
M  +8    -6    umbrello/codegenerators/codeclassfield.cpp
M  +1    -1    umbrello/codegenerators/codeclassfielddeclarationblock.cpp
M  +2    -2    umbrello/codegenerators/codedocument.cpp
M  +3    -3    umbrello/codegenerators/codegenerator.cpp
M  +1    -1    umbrello/codegenerators/codegenobjectwithtextblocks.cpp
M  +2    -2    umbrello/codegenerators/codeoperation.cpp
M  +3    -3    umbrello/codegenerators/codeparameter.cpp
M  +1    -1    umbrello/codegenerators/cpp/cppcodeclassfield.cpp
M  +2    -2    umbrello/codegenerators/cpp/cppcodegenerator.cpp
M  +2    -2    umbrello/codegenerators/cpp/cppheadercodedocument.cpp
M  +1    -1    umbrello/codegenerators/csharp/csharpwriter.cpp
M  +1    -1    umbrello/codegenerators/d/dclassifiercodedocument.cpp
M  +1    -1    umbrello/codegenerators/d/dcodeclassfield.cpp
M  +1    -1    umbrello/codegenerators/java/javaantcodedocument.cpp
M  +1    -1    umbrello/codegenerators/java/javaclassifiercodedocument.cpp
M  +1    -1    umbrello/codegenerators/java/javacodeclassfield.cpp
M  +2    -2    umbrello/codegenerators/ownedcodeblock.cpp
M  +1    -1    umbrello/codegenerators/ownedhierarchicalcodeblock.cpp
M  +2    -2    umbrello/codegenerators/pascal/pascalwriter.cpp
M  +1    -1    umbrello/codegenerators/ruby/rubyclassifiercodedocument.cpp
M  +1    -1    umbrello/codegenerators/ruby/rubycodeclassfield.cpp
M  +1    -1    umbrello/codegenerators/sql/mysqlwriter.cpp
M  +4    -4    umbrello/codegenerators/sql/sqlwriter.cpp
M  +1    -1    umbrello/codegenerators/vala/valawriter.cpp
M  +1    -1    umbrello/codegenerators/xml/xmlschemawriter.cpp
M  +10   -10   umbrello/codeimport/adaimport.cpp
M  +7    -7    umbrello/codeimport/csharp/csharpimport.cpp
M  +7    -7    umbrello/codeimport/idlimport.cpp
M  +8    -8    umbrello/codeimport/import_utils.cpp
M  +9    -9    umbrello/codeimport/javaimport.cpp
M  +5    -5    umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
M  +6    -6    umbrello/codeimport/pascalimport.cpp
M  +3    -3    umbrello/codeimport/pythonimport.cpp
M  +6    -6    umbrello/codeimport/sqlimport.cpp
M  +7    -7    umbrello/dialogs/codeeditor.cpp
M  +4    -4    umbrello/dialogs/pages/classgeneralpage.cpp
M  +11   -11   umbrello/dialogs/pages/classifierlistpage.cpp
M  +2    -2    umbrello/dialogs/pages/constraintlistpage.cpp
M  +1    -1    umbrello/dialogs/umlattributedialog.cpp
M  +4    -4    umbrello/dialogs/umlforeignkeyconstraintdialog.cpp
M  +1    -1    umbrello/dialogs/umloperationdialog.cpp
M  +1    -1    umbrello/dialogs/umluniqueconstraintdialog.cpp
M  +6    -6    umbrello/dialogs/widgets/umldatatypewidget.cpp
M  +1    -1    umbrello/dialogs/widgets/umlpackagewidget.cpp
M  +1    -1    umbrello/docwindow.cpp
M  +1    -1    umbrello/finder/umllistviewfinder.cpp
M  +5    -6    umbrello/listpopupmenu.cpp
M  +14   -14   umbrello/model_utils.cpp
M  +9    -9    umbrello/object_factory.cpp
M  +12   -12   umbrello/petaltree2uml.cpp
M  +25   -25   umbrello/refactoring/refactoringassistant.cpp
M  +1    -1    umbrello/stereotypeswindow.cpp
M  +20   -20   umbrello/umldoc.cpp
M  +34   -29   umbrello/umllistview.cpp
M  +12   -12   umbrello/umllistviewitem.cpp
M  +1    -1    umbrello/umlmodel/association.cpp
M  +8    -8    umbrello/umlmodel/attribute.cpp
M  +1    -1    umbrello/umlmodel/category.cpp
M  +2    -2    umbrello/umlmodel/checkconstraint.cpp
M  +18   -16   umbrello/umlmodel/classifier.cpp
M  +2    -2    umbrello/umlmodel/classifierlistitem.cpp
M  +5    -5    umbrello/umlmodel/entity.cpp
M  +1    -1    umbrello/umlmodel/entityattribute.cpp
M  +1    -1    umbrello/umlmodel/enumliteral.cpp
M  +5    -5    umbrello/umlmodel/folder.cpp
M  +9    -9    umbrello/umlmodel/foreignkeyconstraint.cpp
M  +3    -3    umbrello/umlmodel/operation.cpp
M  +15   -15   umbrello/umlmodel/package.cpp
M  +5    -5    umbrello/umlmodel/umlcanvasobject.cpp
M  +1    -0    umbrello/umlmodel/umlobject.cpp
M  +2    -0    umbrello/umlmodel/umlobject.h
M  +1    -1    umbrello/umlmodel/umlrole.cpp
M  +6    -6    umbrello/umlmodel/uniqueconstraint.cpp
M  +15   -15   umbrello/umlscene.cpp
M  +7    -7    umbrello/umlwidgets/associationwidget.cpp
M  +1    -1    umbrello/umlwidgets/categorywidget.cpp
M  +2    -2    umbrello/umlwidgets/entitywidget.cpp
M  +2    -2    umbrello/umlwidgets/floatingtextwidget.cpp
M  +2    -2    umbrello/umlwidgets/messagewidget.cpp
M  +1    -1    umbrello/umlwidgets/toolbarstateonewidget.cpp
M  +27   -27   umbrello/umlwidgets/widget_factory.cpp
M  +3    -3    umbrello/umlwidgets/widgetbase.cpp

http://commits.kde.org/umbrello/a5f92b67494666e4e6779b1f2443b1a1df2b031d

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list