[Kstars-devel] branches/kstars/summer/kstars/kstars

Khudyakov Alexey alexey.skladnoy at gmail.com
Sat Jul 25 17:31:34 CEST 2009


On Пятница 24 июля 2009 23:52:19 Prakash Mohan wrote:
> > But why do you need pointer to modify QList. You can modify it via
> > reference as well.
> >
> > sessionList returned refrerence to QList, not copy of QList. Compare:
> >
> > // Return reference
> > QList<SkyObject*>& sessionList() { return m_SessionList; }
> > // Return copy of object
> > QList<SkyObject*>  sessionList() { return m_SessionList; }
> >
> > I just prefer references to pointers.
>
> Oh, I din't know that. Thanks for the correction. It is indeed easier
> to pass it by reference.

BTW If you have any C++ related questions feel free to ask. 


More information about the Kstars-devel mailing list