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

Khudyakov Alexey alexey.skladnoy at gmail.com
Fri Jul 24 20:46:41 CEST 2009


On Пятница 24 июля 2009 22:08:24 Prakash Mohan wrote:
> 2009/7/24 Khudyakov Alexey <alexey.skladnoy at gmail.com>:
> > On Пятница 24 июля 2009 01:53:34 Prakash Mohan wrote:
> >> SVN commit 1001665 by prakash:
> >>
> >> Making the sessionList editable by external lists by passing a reference
> >> to it rather than the QList itsef
> >
> > Do you mean pointer to QList? Before change sessionList() returned
> > mutable reference to list.
>
> Yes, a pointer to the QList. Sorry for the unclear message earlier.

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. 


More information about the Kstars-devel mailing list