[umbrello] [Bug 445119] Issues with code ignoring and possibly dereferencing nullptr

Ralf Habacker bugzilla_noreply at kde.org
Tue Nov 23 10:31:56 GMT 2021


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

--- Comment #4 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Robert Hairgrove from comment #3)
> What I can envision now, without knowing all of the details about how this
> class is used, is the following:
> 
> 1. Class UMLObjectList should inherit from QObject, or possibly just
> implement signals and slots using the Q_OBJECT macro;
> 2. UMLObjectList should connect itself via slot to the "destroyed()" signal
> of each element added to its list which should only be permitted through its
> own "append()" function (and removal through a correlated "remove()"
> function);
> 3. Whenever a contained element is destroyed, the slot would have to find
> the pointer in its list and then remove it. Of course, the actual object
> deletion would be left to QPointer.

Feel free to open working branches in your private umbrello git repo on
invent.kde.org where you can add and test appropriate things and result in a
merge request. If such a merge request is not yet ready, a draft can be marked
with the WIP: prefix.

The easiest merge requests to test are those that consist of smaller,
self-contained changes.

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


More information about the umbrello-devel mailing list