| 168 | |
| 169 | |
| 170 | void ThreadFrameModel::updateRows(DebuggerController* controller) |
| 171 | { |
| 172 | beginResetModel(); |
| 173 | |
| 174 | if (rootItem) |
| 175 | { |
| 176 | delete rootItem; |
| 177 | rootItem = new FrameItem(); |
| 178 | } |
| 179 | |
| 180 | QList<FrameItem*> parents; |
| 181 | parents << rootItem; |
| 182 | |
| 183 | std::vector<DebugThread> threads = controller->GetThreads(); |
| 184 | for (const DebugThread& thread : threads) |
| 185 | { |
| 186 | parents.last()->appendChild(new FrameItem(thread, parents.last())); |
| 187 | |
| 188 | parents << parents.last()->child(parents.last()->childCount() - 1); |
| 189 | |
| 190 | std::vector<DebugFrame> frames = controller->GetFramesOfThread(thread.m_tid); |
| 191 | for (const DebugFrame& frame : frames) |
| 192 | { |
| 193 | parents.last()->appendChild(new FrameItem(thread, frame, parents.last())); |
| 194 | } |
| 195 | |
| 196 | parents.pop_back(); |
| 197 | } |
| 198 | |
| 199 | endResetModel(); |
| 200 | } |
| 201 | |
| 202 | |
| 203 | QVariant ThreadFrameModel::headerData(int column, Qt::Orientation orientation, int role) const |
no test coverage detected