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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case InstanceIDRole: {
|
||||||
|
return inst->id();
|
||||||
|
}
|
||||||
|
|
||||||
|
case GroupRole: {
|
||||||
|
return getInstanceGroup(inst->id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,7 @@ public:
|
|||||||
{
|
{
|
||||||
SortRole = Qt::UserRole + 1,
|
SortRole = Qt::UserRole + 1,
|
||||||
GroupRole,
|
GroupRole,
|
||||||
InstancePointerRole, ///< Return pointer to real instance
|
InstanceIDRole
|
||||||
InstanceIDRole ///< Return id if the instance
|
|
||||||
};
|
};
|
||||||
/*!
|
/*!
|
||||||
* \brief Error codes returned by functions in the InstanceList class.
|
* \brief Error codes returned by functions in the InstanceList class.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user