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

--- Comment #5 from Ralf Habacker <ralf.habac...@freenet.de> ---
(In reply to Lays Rodrigues from comment #4)
> Ralf,
> After looking through and read the QPointer Documentation. I think that the
> change that I need to to is that:
> umlwidgetlist.h
> typedef QList<QPointer<UMLWidget>> UMLWidgetList;
> typedef QListIterator<QPointer<UMLWidget>> UMLWidgetListIt;
This is the required change

> But that implies in:
> Alter all objects and methods that handle with UMLWidget in UMLScene file and 
> others files if need it.
> Is that the solution that you mean? 

You do not need to change every reference. See the following example from
http://doc.qt.io/qt-4.8/qpointer.html

code without QPointer

   QLabel* label = new QLabel;
    label->setText("&Status:");
    ...
    if (label)
        label->show();

code with QPointer: 

   QPointer<QLabel> label = new QLabel;
    label->setText("&Status:");
    ...
    if (label)
        label->show();

It is only required to change the definition and mostly references should work
out of the box.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to