summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-11-07 15:42:23 +0100
committerUlf Hermann <ulf.hermann@qt.io>2016-11-24 07:41:25 +0000
commit93ac3a50a6461eb627f79b98e91c442385629ddc (patch)
tree063a2ea5c1609bee7aa3045ea5f67b3d1c1b09ce /src/plugins/qmlprofiler
parent1bb19cc48e571c1442dd52ff088c4a88d83b4ed1 (diff)
downloadqt-creator-93ac3a50a6461eb627f79b98e91c442385629ddc.tar.gz
QmlProfiler: Deduplicate some code
Change-Id: I17dade638202fd4c909020addd6a0a08f3e98c7a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertracefile.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
index ec9195bbd0..3add12e7d9 100644
--- a/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertracefile.cpp
@@ -133,15 +133,14 @@ QmlProfilerFileReader::QmlProfilerFileReader(QObject *parent) :
void QmlProfilerFileReader::setFuture(QFutureInterface<void> *future)
{
m_future = future;
-}
-
-bool QmlProfilerFileReader::loadQtd(QIODevice *device)
-{
if (m_future) {
m_future->setProgressRange(0, 1000);
m_future->setProgressValue(0);
}
+}
+bool QmlProfilerFileReader::loadQtd(QIODevice *device)
+{
QXmlStreamReader stream(device);
bool validVersion = true;
@@ -200,11 +199,6 @@ bool QmlProfilerFileReader::loadQtd(QIODevice *device)
bool QmlProfilerFileReader::loadQzt(QIODevice *device)
{
- if (m_future) {
- m_future->setProgressRange(0, 1000);
- m_future->setProgressValue(0);
- }
-
QDataStream stream(device);
stream.setVersion(QDataStream::Qt_5_5);