Review Request 110236: Remove pointless call to model index parent to count top level items
Daniele E. Domenichelli
daniele.domenichelli at gmail.com
Mon Apr 29 11:57:42 UTC 2013
> On April 29, 2013, 6:57 a.m., Daniele E. Domenichelli wrote:
> > global-presence-chooser.cpp, line 95
> > <http://git.reviewboard.kde.org/r/110236/diff/1/?file=141318#file141318line95>
> >
> > Isn't QModelIndex() and invalid index?
>
> David Edmundson wrote:
> Yes. And the parent of a top level item is an invalid index.
>
> If we look at rowCount we do:
> if (parent.isValid) {return 0;}
>
> we want to pass an invalid index to get the list row count.
I still don't get this, sorry...
If "rowCount(QModelIndex())" returns 0, "rowCount(QModelIndex())-1" is always "-1", or am I missing something?
- Daniele E.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110236/#review31725
-----------------------------------------------------------
On April 29, 2013, 1:56 a.m., David Edmundson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110236/
> -----------------------------------------------------------
>
> (Updated April 29, 2013, 1:56 a.m.)
>
>
> Review request for Telepathy.
>
>
> Description
> -------
>
> Remove pointless call to model index parent to count top level items
>
> BUG: 304085
>
>
> Diffs
> -----
>
> global-presence-chooser.cpp f5d59399a904195121ebac7266bef4176ac82bfb
>
> Diff: http://git.reviewboard.kde.org/r/110236/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> David Edmundson
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20130429/a6a1cdf0/attachment.html>
More information about the KDE-Telepathy
mailing list