diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-02-17 14:31:04 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-02-26 16:19:22 +0000 |
commit | 5515d0308e1a38b7b5a5665a2e3fd6bd92626c5b (patch) | |
tree | 8e0150ae5da847e9c56d3407df1d614b556279b3 /src/plugins/qmlprofiler/qmlprofilertracefile.cpp | |
parent | c3e1ccf78ef646b0af42bc1ecf6e1ddbb9f952c8 (diff) | |
download | qt-creator-5515d0308e1a38b7b5a5665a2e3fd6bd92626c5b.tar.gz |
fix indentation
Change-Id: I4a753fe1c3f94876f1ac2c205f90ff5ccc6504bd
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertracefile.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertracefile.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp index 3f1a7e1c68..8b85d23da4 100644 --- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp @@ -145,58 +145,58 @@ bool QmlProfilerFileReader::load(QIODevice *device) qint64 traceEnd = -1; while (validVersion && !stream.atEnd() && !stream.hasError()) { - QXmlStreamReader::TokenType token = stream.readNext(); - const QStringRef elementName = stream.name(); - switch (token) { - case QXmlStreamReader::StartDocument : continue; - case QXmlStreamReader::StartElement : { - if (elementName == _("trace")) { - QXmlStreamAttributes attributes = stream.attributes(); - if (attributes.hasAttribute(_("version"))) - validVersion = attributes.value(_("version")) == _(PROFILER_FILE_VERSION); - else - validVersion = false; - if (attributes.hasAttribute(_("traceStart"))) - traceStart = attributes.value(_("traceStart")).toString().toLongLong(); - if (attributes.hasAttribute(_("traceEnd"))) - traceEnd = attributes.value(_("traceEnd")).toString().toLongLong(); - } - - if (elementName == _("eventData")) { - loadEventData(stream); - break; - } - - if (elementName == _("profilerDataModel")) { - loadProfilerDataModel(stream); - break; - } - - if (elementName == _("noteData")) { - loadNoteData(stream); - break; - } - - if (elementName == _("v8profile")) { - if (m_v8Model) - m_v8Model->load(stream); - break; - } - - break; - } - default: break; - } - } - - if (stream.hasError()) { - emit error(tr("Error while parsing trace data file: %1").arg(stream.errorString())); - return false; - } else { - m_qmlModel->setData(traceStart, qMax(traceStart, traceEnd), m_qmlEvents, m_ranges); - m_qmlModel->setNoteData(m_notes); - return true; - } + QXmlStreamReader::TokenType token = stream.readNext(); + const QStringRef elementName = stream.name(); + switch (token) { + case QXmlStreamReader::StartDocument : continue; + case QXmlStreamReader::StartElement : { + if (elementName == _("trace")) { + QXmlStreamAttributes attributes = stream.attributes(); + if (attributes.hasAttribute(_("version"))) + validVersion = attributes.value(_("version")) == _(PROFILER_FILE_VERSION); + else + validVersion = false; + if (attributes.hasAttribute(_("traceStart"))) + traceStart = attributes.value(_("traceStart")).toString().toLongLong(); + if (attributes.hasAttribute(_("traceEnd"))) + traceEnd = attributes.value(_("traceEnd")).toString().toLongLong(); + } + + if (elementName == _("eventData")) { + loadEventData(stream); + break; + } + + if (elementName == _("profilerDataModel")) { + loadProfilerDataModel(stream); + break; + } + + if (elementName == _("noteData")) { + loadNoteData(stream); + break; + } + + if (elementName == _("v8profile")) { + if (m_v8Model) + m_v8Model->load(stream); + break; + } + + break; + } + default: break; + } + } + + if (stream.hasError()) { + emit error(tr("Error while parsing trace data file: %1").arg(stream.errorString())); + return false; + } else { + m_qmlModel->setData(traceStart, qMax(traceStart, traceEnd), m_qmlEvents, m_ranges); + m_qmlModel->setNoteData(m_notes); + return true; + } } void QmlProfilerFileReader::loadEventData(QXmlStreamReader &stream) |