aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-06-07 13:54:23 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-06-10 09:03:08 +0000
commit52ee1141a82ebfc1351f052d00d0fe0d76df84b9 (patch)
tree0699058eaed62f52913b3c381d1dd1c27186e9a3 /src/plugins/qmlprofiler/qmlprofilertracefile.cpp
parent0c0cb4b0438de0c798163b50e641b3a7144fc76b (diff)
QmlProfiler: Make members of QmlNote private
The only member that can change after initialization is the text. Change-Id: I6958f510e67c9fd6fe1f109c2676f80d93e7fd0c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertracefile.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertracefile.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
index ede4af154f..534c74c04b 100644
--- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
@@ -525,14 +525,14 @@ void QmlProfilerFileReader::loadNotes(QXmlStreamReader &stream)
if (elementName == _("note")) {
updateProgress(stream.device());
QXmlStreamAttributes attrs = stream.attributes();
- currentNote.startTime = attrs.value(_("startTime")).toLongLong();
- currentNote.duration = attrs.value(_("duration")).toLongLong();
- currentNote.typeIndex = attrs.value(_("eventIndex")).toInt();
+ currentNote = QmlNote(attrs.value(_("eventIndex")).toInt(),
+ attrs.value(_("startTime")).toLongLong(),
+ attrs.value(_("duration")).toLongLong());
}
break;
}
case QXmlStreamReader::Characters: {
- currentNote.text = stream.text().toString();
+ currentNote.setText(stream.text().toString());
break;
}
case QXmlStreamReader::EndElement: {
@@ -747,10 +747,10 @@ void QmlProfilerFileWriter::saveQtd(QIODevice *device)
const QmlNote &note = m_notes[noteIndex];
stream.writeStartElement(_("note"));
- stream.writeAttribute(_("startTime"), QString::number(note.startTime));
- stream.writeAttribute(_("duration"), QString::number(note.duration));
- stream.writeAttribute(_("eventIndex"), QString::number(note.typeIndex));
- stream.writeCharacters(note.text);
+ stream.writeAttribute(_("startTime"), QString::number(note.startTime()));
+ stream.writeAttribute(_("duration"), QString::number(note.duration()));
+ stream.writeAttribute(_("eventIndex"), QString::number(note.typeIndex()));
+ stream.writeCharacters(note.text());
stream.writeEndElement(); // note
incrementProgress();
}