KoTableColumnAndRowStyleManager Question.
Sebastian Sauer
mail at dipe.org
Thu Apr 28 01:07:32 BST 2011
On Monday 28 February 2011 10:08:53 Ganesh Paramasivam wrote:
> Yes, you are right. I missed looking at this declaration
> QExplicitlySharedDataPointer<Private> d;
But imho it would still be great to change it to a reference so it's easier to
understand the code without looking at the private implementation-details
(also saving a copy cannot harm :)
> - Ganesh
>
> On Mon, Feb 28, 2011 at 2:30 PM, Elvis Stansvik <elvstone at gmail.com> wrote:
> > 2011/2/28 Ganesh Paramasivam <ganesh at crystalfab.com>:
> >> Casper,
> >>
> >> A Quick question
> >>
> >> In KoTableColumnAndRowStyleManager.cpp we have a getManager() function
> >> with the prototype
> >>
> >> KoTableColumnAndRowStyleManager
> >> KoTableColumnAndRowStyleManager::getManager(QTextTable *table)
> >>
> >> Shouldn't the function return a reference or a pointer ? like this
> >>
> >> KoTableColumnAndRowStyleManager&
> >> KoTableColumnAndRowStyleManager::getManager(QTextTable *table)
> >>
> >> If I were to set a row-style or a column-style for a table and do this
> >> KoTableColumnAndRowStyleManager::getManager(table)->setRowStyle(0,
> >> rowStyle) I would be setting these values on a copy of the return value
> >> ( and not on the actual Manager ).
> >
> > Yes you would.
> >
> > Not sure, but I guess it works because KoTableColumnAndRowStyleManager
> > is explicitly shared. I.e. all KoTableColumnAndRowStyleManager
> > instances share the same data. Right Casper?
> >
> > Elvis
> >
> >> Am I missing something ?
> >>
> >> Thanks,
> >> Ganesh
> >> _______________________________________________
> >> calligra-devel mailing list
> >> calligra-devel at kde.org
> >> https://mail.kde.org/mailman/listinfo/calligra-devel
> >
> > _______________________________________________
> > calligra-devel mailing list
> > calligra-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/calligra-devel
>
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
More information about the calligra-devel
mailing list