X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fapitracecall.cpp;h=f500d90c8b2f62b89a12c626a62418e5a88125c8;hb=9523768fe89d08e8e21922a973e0f8424459e9b9;hp=807476295cb606a3da26d868e5ebeb46ca7f1cbc;hpb=289dc2f377af1d8bc95a94b390b682b15e560bff;p=apitrace diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp index 8074762..f500d90 100644 --- a/gui/apitracecall.cpp +++ b/gui/apitracecall.cpp @@ -208,16 +208,7 @@ void VariantVisitor::visit(Trace::Array *array) void VariantVisitor::visit(Trace::Blob *blob) { - //XXX - //FIXME: this is a nasty hack. Trace::Blob's can't - // delete the contents in the destructor because - // the data is being used by other calls. We piggy back - // on that assumption and don't deep copy the data. If - // Blob's will start deleting the data we will need to - // start deep copying it or switch to using something like - // Boost's shared_ptr or Qt's QSharedPointer to handle it - blob->toPointer(true); - QByteArray barray = QByteArray::fromRawData(blob->buf, blob->size); + QByteArray barray = QByteArray(blob->buf, blob->size); m_variant = QVariant(barray); }