27 #include <KDABLibFakes>
31 #define ATTRIBUTE __attribute__((__may_alias__))
49 const QAbstractItemModel *m;
54 if ( !sourceIndex.isValid() )
58 Q_ASSERT( sourceIndex.model() == sourceModel() );
62 return createIndex( sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer() );
67 if ( !proxyIndex.isValid() )
69 if ( proxyIndex.model() != this )
70 qDebug() << proxyIndex.model() <<
this;
71 Q_ASSERT( proxyIndex.model() == this );
74 QModelIndex sourceIndex;
75 KDPrivateModelIndex* hack =
reinterpret_cast<KDPrivateModelIndex*
>(&sourceIndex);
76 hack->r = proxyIndex.row();
77 hack->c = proxyIndex.column();
78 hack->p = proxyIndex.internalPointer();
79 hack->m = sourceModel();
80 Q_ASSERT( sourceIndex.isValid() );
86 Q_ASSERT(sourceModel());
92 Q_ASSERT(sourceModel());