- apiCallFromTraceCall(call, m_helpHash, currentFrame, this);
- calls.append(apiCall);
+ apiCallFromTraceCall(call, m_helpHash, currentFrame, groups.isEmpty() ? 0 : groups.top(), this);
+ allCalls.append(apiCall);
+ if (groups.count() == 0) {
+ topLevelItems.append(apiCall);
+ }
+ if (call->flags & trace::CALL_FLAG_MARKER_PUSH) {
+ groups.push(apiCall);
+ } else if (call->flags & trace::CALL_FLAG_MARKER_POP) {
+ groups.top()->finishedAddingChildren();
+ groups.pop();
+ }
+ if (!groups.isEmpty()) {
+ groups.top()->addChild(apiCall);
+ }