summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2011-11-16 17:22:40 -0800
committerJosé Fonseca <jose.r.fonseca@gmail.com>2012-01-27 22:15:13 +0000
commita5b476eb4eed9b06e22f4a80b16251aea243207d (patch)
tree7a5496e0d95b114ccec1140bc397e7eaa7a22606 /gui
parent630471a20c46045950a0f8285d2150ab1f90d9c8 (diff)
Correctly copy "out" arguments to the "leave" portion of the trace
To do this, we take advantage of the new Arg struct to save, for each arg, whether it was parsed after an ENTER event or after a LEAVE event.
Diffstat (limited to 'gui')
-rw-r--r--gui/apitracecall.cpp4
-rw-r--r--gui/saverthread.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp
index 57d2d86e..267dc098 100644
--- a/gui/apitracecall.cpp
+++ b/gui/apitracecall.cpp
@@ -678,9 +678,9 @@ ApiTraceCall::ApiTraceCall(ApiTraceFrame *parentFrame,
}
m_argValues.reserve(call->args.size());
for (int i = 0; i < call->args.size(); ++i) {
- if (call->args[i]) {
+ if (call->args[i].value) {
VariantVisitor argVisitor(loader);
- call->args[i]->visit(argVisitor);
+ call->args[i].value->visit(argVisitor);
m_argValues.append(argVisitor.variant());
if (m_argValues[i].type() == QVariant::ByteArray) {
m_hasBinaryData = true;
diff --git a/gui/saverthread.cpp b/gui/saverthread.cpp
index 7e7c471d..54ef5d24 100644
--- a/gui/saverthread.cpp
+++ b/gui/saverthread.cpp
@@ -314,12 +314,12 @@ static void
overwriteValue(trace::Call *call, const QVariant &val, int index)
{
EditVisitor visitor(val);
- trace::Value *origValue = call->args[index];
+ trace::Value *origValue = call->args[index].value;
origValue->visit(visitor);
if (visitor.value() && origValue != visitor.value()) {
delete origValue;
- call->args[index] = visitor.value();
+ call->args[index].value = visitor.value();
}
}