Changeset 6194 for trunk/qt4-gui

Show
Ignore:
Timestamp:
05/15/08 02:13:23 (4 months ago)
Author:
flynd
Message:

Don't pass proxy indexes along to model. This fixes problem with crashes when using floaties and Qt 4.4.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/contactlist/singlecontactproxy.cpp

    r5837 r6194  
    8383} 
    8484 
    85 int SingleContactProxy::columnCount(const QModelIndex& parent) const 
     85int SingleContactProxy::columnCount(const QModelIndex& /* parent */) const 
    8686{ 
    87   return myContactList->columnCount(parent); 
     87  return myContactList->columnCount(QModelIndex()); 
    8888} 
    8989 
     
    9898Qt::ItemFlags SingleContactProxy::flags(const QModelIndex& index) const 
    9999{ 
    100   return myContactList->flags(index); 
     100  if (!index.isValid() || index.row() != 0) 
     101    return Qt::ItemIsEnabled; 
     102 
     103  int column = index.column(); 
     104  if (column < 0 || column >= MAX_COLUMNCOUNT) 
     105    return Qt::ItemIsEnabled; 
     106 
     107  return myContactList->flags(mySourceIndex[column]); 
    101108} 
    102109