aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertracefile.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-02-17 14:25:24 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-02-26 16:19:27 +0000
commitd2892026c8eb979c046b14095f82f4f69218717f (patch)
treef792256151ece9859b87a4a213540feb4336adc6 /src/plugins/qmlprofiler/qmlprofilertracefile.h
parent5515d0308e1a38b7b5a5665a2e3fd6bd92626c5b (diff)
QmlProfiler: fix progress bar visibilty for loading traces
Move the main part of the loading work into a background thread and show the standard progress indicator for the "reading file" part of the load operation. The load operation can be canceled now. Change-Id: I4cb3b762072ab4a0665dcf9d4a39d6d6630d22e8 Task-number: QTCREATORBUG-11822 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertracefile.h')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertracefile.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertracefile.h b/src/plugins/qmlprofiler/qmlprofilertracefile.h
index 992b2632785..e87cd15c47f 100644
--- a/src/plugins/qmlprofiler/qmlprofilertracefile.h
+++ b/src/plugins/qmlprofiler/qmlprofilertracefile.h
@@ -58,6 +58,7 @@ public:
void setV8DataModel(QV8ProfilerDataModel *dataModel);
void setQmlDataModel(QmlProfilerDataModel *dataModel);
+ void setFuture(QFutureInterface<void> *future);
bool load(QIODevice *device);
@@ -68,9 +69,12 @@ private:
void loadEventData(QXmlStreamReader &reader);
void loadProfilerDataModel(QXmlStreamReader &reader);
void loadNoteData(QXmlStreamReader &reader);
+ void progress(QIODevice *device);
+ bool isCanceled() const;
QV8ProfilerDataModel *m_v8Model;
QmlProfilerDataModel *m_qmlModel;
+ QFutureInterface<void> *m_future;
QVector<QmlProfilerDataModel::QmlEventTypeData> m_qmlEvents;
QVector<QmlProfilerDataModel::QmlEventData> m_ranges;
QVector<QmlProfilerDataModel::QmlEventNoteData> m_notes;