forked from qt-creator/qt-creator
Make handling of model ids compatible with Qt 5.
QAbstractItemModel::internalId() returns a quintptr in Qt 5. Handle this in a way compatible with both Qt 4 and Qt 5. Change-Id: Iacb9ab71e95085f061fac1e3f4e4759ed43ca7ef Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -192,7 +192,7 @@ QModelIndex StackModel::parent(const QModelIndex &child) const
|
||||
{
|
||||
QTC_ASSERT(!child.isValid() || child.model() == this, return QModelIndex());
|
||||
|
||||
if (child.internalId() == -1)
|
||||
if (quintptr(child.internalId()) == quintptr(-1))
|
||||
return QModelIndex();
|
||||
return createIndex(child.internalId(), 0, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user