[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Patch for KTeaTime
From: Daniel Teske <teske () squorn ! de>
Date: 2007-08-27 20:54:17
Message-ID: 200708272302.45513.teske () squorn ! de
[Download RAW message or body]
> > Hmm, this is actually wrong. The correct code is:
> > if(parent.isValid())
> > return 0;
> > else
> > return m_tealist.size();
> >
> > (Pretty clear, right?)
>
> Not for me :-(
> This code returns something if the index is _not_ valid? Is this the
> intention?
Yes. :)
The (invisible) root of a model is a invalid QModelIndex. That root has one child per \
tea. So for the root the code must return tealist.siez(). Each and every child, i.e. \
every tea has no child, so if the QModelIndex is valid, and is thus not the invisible \
root, the code musr return 0.
daniel
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic