fix: add support for custom roles again
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
b0dc7927fb
commit
adc27f0577
@ -211,6 +211,14 @@ QVariant InstanceList::data(const QModelIndex& index, int role) const {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case InstanceIDRole: {
|
||||
return inst->id();
|
||||
}
|
||||
|
||||
case GroupRole: {
|
||||
return getInstanceGroup(inst->id());
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -88,8 +88,7 @@ public:
|
||||
{
|
||||
SortRole = Qt::UserRole + 1,
|
||||
GroupRole,
|
||||
InstancePointerRole, ///< Return pointer to real instance
|
||||
InstanceIDRole ///< Return id if the instance
|
||||
InstanceIDRole
|
||||
};
|
||||
/*!
|
||||
* \brief Error codes returned by functions in the InstanceList class.
|
||||
|
Loading…
x
Reference in New Issue
Block a user