https://bugs.kde.org/show_bug.cgi?id=449465
Oliver Kellogg <okell...@users.sourceforge.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version Fixed In| |2.34.70 (KDE releases | |22.07.70) Status|CONFIRMED |RESOLVED Resolution|--- |FIXED Latest Commit| |https://invent.kde.org/sdk/ | |umbrello/commit/0d855d0deb4 | |19f0a38bc486ce0441da4298890 | |4b --- Comment #4 from Oliver Kellogg <okell...@users.sourceforge.net> --- Git commit 0d855d0deb419f0a38bc486ce0441da42988904b by Oliver Kellogg. Committed on 13/06/2022 at 05:56. Pushed by okellogg into branch 'master'. Fix "Pascal code import is very slow" umbrello/umllistviewitem.{h,cpp} - Remove empty reimplementation of destructor (we want the parent destructor to execute). - Member m_comap is renamed to s_comap, changed to `static`, and is changed pointer. It now acts as a global map for all UMLObjects pertaining to the list view. The switch to pointer is done for reducing risk of static initialization order problems. - New static function deleteItem removes the given UMLListViewItem from s_comap and calls its destructor. - At function findChildObject add `const` on argument `child`. - New protected function findUMLObject_r is auxiliary to findUMLObject. It is invoked when the given object is not found in s_comap. - Change implementation of ChildObjectMap from QMap to QHash. Reason: QHash is more appropriate for pointer arguments. umbrello/umllistviewitem.cpp - In function init() allocate s_comap if null. - Adjust functions addChildItem, deleteChildItem, deepCopy to the changes related to m_comap -> s_comap. umbrello/umllistview.cpp - In function slotObjectCreated add calls to parentItem->addChildItem() for updating s_comap. - In function slotObjectRemoved replace destruction of `item` by call to deleteItem() in order to update s_comap. - In function init(), - reduce content of `if (m_rv == 0)`; - call clean() unconditionally; - execute for-loop over N_MODELTYPES unconditionally and in its body add call to m_rv->addChildItem(sysFolder, m_lv[i]) for updating s_comap; - call m_lv[Uml::ModelType::Logical]->addChildItem(datatypeFolder) for updating s_comap with m_datatypeFolder. - In function clean(), - clean up documentation; - set m_datatypeFolder to 0; - in for-loop over N_MODELTYPES remove call to deleteChildrenOf() and add setting of m_lv[i] to 0; - call deleteChildrenOf(m_rv). - In function moveObject, - remove handling of m_doc->loading() (see function acceptDrag); - replace `delete move` by UMLListViewItem::deleteItem(move) for updating s_comap; - add handling of case UMLListViewItem::lvt_EnumLiteral. - In function addNewItem case instanceOfClass add call to instanceItem->addChildItem() for updating s_comap. - In function loadChildrenFromXMI loading of structural objects add call to parent->addChildItem() to update s_comap. - In function deleteChildrenOf case (typeIsCanvasWidget(lvt) || typeIsClassifierList(lvt)) case !object, replace `delete temp` by call to UMLListViewItem::deleteItem(temp). FIXED-IN: 2.34.70 (KDE releases 22.07.70) M +86 -65 umbrello/umllistview.cpp M +58 -18 umbrello/umllistviewitem.cpp M +8 -6 umbrello/umllistviewitem.h https://invent.kde.org/sdk/umbrello/commit/0d855d0deb419f0a38bc486ce0441da42988904b -- You are receiving this mail because: You are watching all bug changes.