summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/cornucopia
authormickeyl <mickeyl>2003-02-24 21:37:49 (UTC)
committer mickeyl <mickeyl>2003-02-24 21:37:49 (UTC)
commitd14b92ef8984ae654ff187bf6c8f5946d3ba218d (patch) (unidiff)
treefd209280150b48eb137315d9bfe693892525697e /noncore/net/wellenreiter/cornucopia
parent93151a1467b45759d320ce6673160190d6ab8872 (diff)
downloadopie-d14b92ef8984ae654ff187bf6c8f5946d3ba218d.zip
opie-d14b92ef8984ae654ff187bf6c8f5946d3ba218d.tar.gz
opie-d14b92ef8984ae654ff187bf6c8f5946d3ba218d.tar.bz2
- work around yet another g++ 2.x bug
- started work on saving session to xml [ any classes from libopie I can reuse without too much effort? ]
Diffstat (limited to 'noncore/net/wellenreiter/cornucopia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/cornucopia/olistview.cpp8
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()
199bool OListViewItem::isAlternate() 199bool 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
242void OListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) 242void OListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)