QmlProfiler: Save/Load thread ids in trace files

Without this, a trace will change if you save and then reload it.

Change-Id: I78bc6c58df2eb79305c069a5e45f62f9bf58c4ce
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-03-17 12:04:23 +01:00
parent 627e2b4807
commit 71da9c4ac8

View File

@@ -317,6 +317,8 @@ void QmlProfilerFileReader::loadProfilerDataModel(QXmlStreamReader &stream)
range.numericData1 = attributes.value(_("framerate")).toString().toLongLong(); range.numericData1 = attributes.value(_("framerate")).toString().toLongLong();
if (attributes.hasAttribute(_("animationcount"))) if (attributes.hasAttribute(_("animationcount")))
range.numericData2 = attributes.value(_("animationcount")).toString().toLongLong(); range.numericData2 = attributes.value(_("animationcount")).toString().toLongLong();
if (attributes.hasAttribute(_("thread")))
range.numericData3 = attributes.value(_("thread")).toString().toLongLong();
if (attributes.hasAttribute(_("width"))) if (attributes.hasAttribute(_("width")))
range.numericData1 = attributes.value(_("width")).toString().toLongLong(); range.numericData1 = attributes.value(_("width")).toString().toLongLong();
if (attributes.hasAttribute(_("height"))) if (attributes.hasAttribute(_("height")))
@@ -483,6 +485,7 @@ void QmlProfilerFileWriter::save(QIODevice *device)
stream.writeAttribute(_("framerate"), QString::number(range.numericData1)); stream.writeAttribute(_("framerate"), QString::number(range.numericData1));
stream.writeAttribute(_("animationcount"), QString::number(range.numericData2)); stream.writeAttribute(_("animationcount"), QString::number(range.numericData2));
stream.writeAttribute(_("thread"), QString::number(range.numericData3));
} }
// special: pixmap cache event // special: pixmap cache event