Git commit d11541acaa64952d810e7f0a518c27ee62679814 by Friedrich W. H. Koss= ebau. Committed on 31/08/2015 at 22:37. Pushed by kossebau into branch 'master'. Fix some magic (and wrong in Qt5 times) numbers in PertResultItemModel M +10 -6 plan/libs/models/kptpertcpmmodel.cpp http://commits.kde.org/calligra/d11541acaa64952d810e7f0a518c27ee62679814 diff --git a/plan/libs/models/kptpertcpmmodel.cpp b/plan/libs/models/kptper= tcpmmodel.cpp index cb653b8..e027894 100644 --- a/plan/libs/models/kptpertcpmmodel.cpp +++ b/plan/libs/models/kptpertcpmmodel.cpp @@ -43,6 +43,10 @@ class Task; = typedef QList NodeList; = +// TODO: find some better values +static const quintptr ListItemId =3D static_cast(-1); +static const quintptr ProjectItemId =3D static_cast(-2); + CriticalPathItemModel::CriticalPathItemModel( QObject *parent ) : ItemModelBase( parent ), m_manager( 0 ) @@ -487,7 +491,7 @@ QModelIndex PertResultItemModel::parent( const QModelIn= dex &index ) const if ( m_top.value( row ) =3D=3D 0 ) { return QModelIndex(); } - return createIndex( row, 0, -1 ); + return createIndex( row, 0, ListItemId ); } = QModelIndex PertResultItemModel::index( int row, int column, const QModelI= ndex &parent ) const @@ -497,13 +501,13 @@ QModelIndex PertResultItemModel::index( int row, int = column, const QModelIndex & } if ( ! parent.isValid() ) { if ( row =3D=3D 0 ) { - QModelIndex idx =3D createIndex(row, column, -2 ); // project + QModelIndex idx =3D createIndex(row, column, ProjectItemId ); = // project return idx; } if ( row >=3D m_top.count() ) { return QModelIndex(); // shouldn't happend } - QModelIndex idx =3D createIndex(row, column, -1 ); + QModelIndex idx =3D createIndex(row, column, ListItemId ); //kDebug(planDbg())<