MCPcopy Create free account
hub / github.com/Vector35/debugger / updateRows

Method updateRows

ui/threadframes.cpp:170–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169
170void 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
203QVariant ThreadFrameModel::headerData(int column, Qt::Orientation orientation, int role) const

Callers 1

updateContentMethod · 0.45

Calls 5

appendChildMethod · 0.80
childMethod · 0.80
childCountMethod · 0.80
GetThreadsMethod · 0.45
GetFramesOfThreadMethod · 0.45

Tested by

no test coverage detected