Diffstat (limited to 'noncore/net/wellenreiter/cornucopia/olistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/cornucopia/olistview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/cornucopia/olistview.cpp b/noncore/net/wellenreiter/cornucopia/olistview.cpp index bca17b2..8bc59de 100644 --- a/noncore/net/wellenreiter/cornucopia/olistview.cpp +++ b/noncore/net/wellenreiter/cornucopia/olistview.cpp | |||
@@ -199,16 +199,16 @@ const QColor &OListViewItem::backgroundColor() | |||
199 | bool OListViewItem::isAlternate() | 199 | bool OListViewItem::isAlternate() |
200 | { | 200 | { |
201 | OListView *lv = static_cast<OListView*>( listView() ); | 201 | OListView *lv = static_cast<OListView*>( listView() ); |
202 | 202 | ||
203 | // check if the item above is an OListViewItem | 203 | // check if the item above is an OListViewItem |
204 | OListViewItem *above = static_cast<OListViewItem*>( itemAbove() ); | 204 | OListViewItem *above = static_cast<OListViewItem*>( itemAbove() ); |
205 | /*if (not itemAbove()->inherits( "OListViewItem" )) return false;*/ | 205 | /*if (! itemAbove()->inherits( "OListViewItem" )) return false;*/ |
206 | 206 | ||
207 | // check if we have a valid alternate background color | 207 | // check if we have a valid alternate background color |
208 | if (not (lv && lv->alternateBackground().isValid())) return false; | 208 | if (!(lv && lv->alternateBackground().isValid())) return false; |
209 | 209 | ||
210 | m_known = above ? above->m_known : true; | 210 | m_known = above ? above->m_known : true; |
211 | if (m_known) | 211 | if (m_known) |
212 | { | 212 | { |
213 | m_odd = above ? !above->m_odd : false; | 213 | m_odd = above ? !above->m_odd : false; |
214 | } | 214 | } |
@@ -218,25 +218,25 @@ bool OListViewItem::isAlternate() | |||
218 | bool previous = true; | 218 | bool previous = true; |
219 | if (parent()) | 219 | if (parent()) |
220 | { | 220 | { |
221 | item = static_cast<OListViewItem *>(parent()); | 221 | item = static_cast<OListViewItem *>(parent()); |
222 | if ( item /*&& item->inherits( "OListViewItem" )*/ ) previous = item->m_odd; | 222 | if ( item /*&& item->inherits( "OListViewItem" )*/ ) previous = item->m_odd; |
223 | item = static_cast<OListViewItem *>(parent()->firstChild()); | 223 | item = static_cast<OListViewItem *>(parent()->firstChild()); |
224 | /* if !( item.inherits( "OListViewItem" ) item = 0; */ | 224 | /* if ( !item.inherits( "OListViewItem" ) item = 0; */ |
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
228 | item = static_cast<OListViewItem *>(lv->firstChild()); | 228 | item = static_cast<OListViewItem *>(lv->firstChild()); |
229 | } | 229 | } |
230 | 230 | ||
231 | while(item) | 231 | while(item) |
232 | { | 232 | { |
233 | item->m_odd = previous = !previous; | 233 | item->m_odd = previous = !previous; |
234 | item->m_known = true; | 234 | item->m_known = true; |
235 | item = static_cast<OListViewItem *>(item->nextSibling()); | 235 | item = static_cast<OListViewItem *>(item->nextSibling()); |
236 | /* if !(item.inherits( "OListViewItem" ) ) break; */ | 236 | /* if (!item.inherits( "OListViewItem" ) ) break; */ |
237 | } | 237 | } |
238 | } | 238 | } |
239 | return m_odd; | 239 | return m_odd; |
240 | } | 240 | } |
241 | 241 | ||
242 | void OListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) | 242 | void OListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) |