MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / data

Method data

TaskFlow/Editor/TaskModel.cpp:19–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19QVariant TaskModel::data(const QModelIndex &index, int role) const
20{
21 if (!index.isValid() || !m_flow || index.row() >= m_flow->tasks().size())
22 return QVariant();
23
24 const auto &task = m_flow->tasks().values();
25
26 switch (role) {
27 case TaskRoles::TaskIdRole:
28 return task.at(index.row())->taskId();
29 case TaskRoles::TaskDataRole:
30 return QVariant::fromValue(task.at(index.row()));
31 default:
32 return QVariant();
33 }
34}
35
36QHash<int, QByteArray> TaskModel::roleNames() const
37{

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
tasksMethod · 0.80
isValidMethod · 0.45
taskIdMethod · 0.45

Tested by

no test coverage detected