int CurveCreator_TreeViewModel::columnCount(const QModelIndex & parent ) const
{
- if( parent.internalId() == ID_SECTION )
+ if( parent.internalId() == (quintptr)ID_SECTION )
return 2;
else
return 2;
int aRow = index.row();
int aColumn = index.column();
if( myCurve ){
- if( index.internalId() == ID_SECTION ){
+ if( index.internalId() == (quintptr)ID_SECTION ){
if( role == Qt::DisplayRole ){
if( aColumn == 0 )
return QString::fromStdString(myCurve->getSectionName(aRow));
if( !theIndex.isValid() )
return QModelIndex();
- if( theIndex.internalId() == ID_SECTION ){
+ if( theIndex.internalId() == (quintptr)ID_SECTION ){
return QModelIndex();
}
return createIndex( theIndex.internalId(), 0, ID_SECTION );
aRowCnt = myCurve->getNbSections();
}
else{
- if( parent.internalId() == ID_SECTION ){
+ if( parent.internalId() == (quintptr)ID_SECTION ){
//Points level
aRowCnt = myCurve->getNbPoints(parent.row());
}
bool CurveCreator_TreeViewModel::isSection( const QModelIndex& theIndx ) const
{
- if( theIndx.internalId() == ID_SECTION )
+ if( theIndx.internalId() == (quintptr)ID_SECTION )
return true;
return false;
}
int CurveCreator_TreeViewModel::getSection( const QModelIndex& theIndx ) const
{
- if( theIndx.internalId() == ID_SECTION )
+ if( theIndx.internalId() == (quintptr)ID_SECTION )
return theIndx.row();
return theIndx.internalId();
}
int CurveCreator_TreeViewModel::getPoint( const QModelIndex& theIndx ) const
{
- if( theIndx.internalId() == ID_SECTION )
+ if( theIndx.internalId() == (quintptr)ID_SECTION )
return -1;
return theIndx.row();
}
}
}
-void CurveCreator_TreeView::setIndexState( const QModelIndex& theIndx, bool& isExpanded, bool& isSelected, bool& isCurrent )
+void CurveCreator_TreeView::setIndexState( const QModelIndex& theIndx, bool& isExpanded, bool& isSelected, bool& /*isCurrent*/ ) // todo: isCurrent is not set!
{
setExpanded( theIndx, isExpanded );
QItemSelectionModel::SelectionFlags aFlag = QItemSelectionModel::Select;