Changeset View
Changeset View
Standalone View
Standalone View
debugger/util/treemodel.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 59 | if (role == ItemRole) | |||
---|---|---|---|---|---|
60 | return QVariant::fromValue(item); | 60 | return QVariant::fromValue(item); | ||
61 | 61 | | |||
62 | return item->data(index.column(), role); | 62 | return item->data(index.column(), role); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const | 65 | Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const | ||
66 | { | 66 | { | ||
67 | if (!index.isValid()) | 67 | if (!index.isValid()) | ||
68 | return nullptr; | 68 | return Qt::NoItemFlags; | ||
69 | 69 | | |||
70 | return Qt::ItemIsEnabled | Qt::ItemIsSelectable; | 70 | return Qt::ItemIsEnabled | Qt::ItemIsSelectable; | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | QVariant TreeModel::headerData(int section, Qt::Orientation orientation, | 73 | QVariant TreeModel::headerData(int section, Qt::Orientation orientation, | ||
74 | int role) const | 74 | int role) const | ||
75 | { | 75 | { | ||
76 | if (orientation == Qt::Horizontal && role == Qt::DisplayRole) | 76 | if (orientation == Qt::Horizontal && role == Qt::DisplayRole) | ||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |