diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-05-11 13:58:20 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-05-23 11:44:13 +0000 |
commit | 1093be042513e643fe11e364164d59f11476ba27 (patch) | |
tree | dd0f2adfc26d3ec66e4c7131dad41495992b1b9f /src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp | |
parent | 46e043ed1ed273b2dd8b4a000f6644c8ca1d09f1 (diff) | |
download | qt-creator-1093be042513e643fe11e364164d59f11476ba27.tar.gz |
QmlProfiler: Remove detailed progress tracking
The progress bar in the state widget was rather meaningless. We rarely
know how many events we expect and it's rather hard to tell how long
each model will take to process them. Instead, we just show a 0-ranged
progress bar to tell the user that "something is happening".
Change-Id: Icb80840d1f0a1538bcf254faa37cbb36e25d342c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp index c46b51d152..72a122168c 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp @@ -63,9 +63,6 @@ QmlProfilerStatisticsModel::QmlProfilerStatisticsModel(QmlProfilerModelManager * this, &QmlProfilerStatisticsModel::notesChanged); d->modelId = modelManager->registerModelProxy(); - // We're iterating twice in loadData. - modelManager->setProxyCountWeight(d->modelId, 2); - d->acceptedTypes << Compiling << Creating << Binding << HandlingSignal << Javascript; modelManager->announceFeatures(d->modelId, Constants::QML_JS_RANGE_FEATURES); @@ -106,7 +103,6 @@ const QHash<int, QString> &QmlProfilerStatisticsModel::getNotes() const void QmlProfilerStatisticsModel::clear() { - d->modelManager->modelProxyCountUpdated(d->modelId, 0, 1); d->data.clear(); d->eventsInBindingLoop.clear(); d->notes.clear(); @@ -234,14 +230,9 @@ void QmlProfilerStatisticsModel::loadData(qint64 rangeStart, qint64 rangeEnd) if (callStack.count() > 1) d->data[callStack.top()->typeIndex()].durationSelf -= event->duration(); callStack.push(event); - - d->modelManager->modelProxyCountUpdated(d->modelId, i, eventList.count()*2); } // post-process: calc mean time, median time, percentoftime - int i = d->data.size(); - int total = i * 2; - for (QHash<int, QmlEventStats>::iterator it = d->data.begin(); it != d->data.end(); ++it) { QmlEventStats* stats = &it.value(); if (stats->calls > 0) @@ -255,7 +246,6 @@ void QmlProfilerStatisticsModel::loadData(qint64 rangeStart, qint64 rangeEnd) stats->percentOfTime = stats->duration * 100.0 / qmlTime; stats->percentSelf = stats->durationSelf * 100.0 / qmlTime; - d->modelManager->modelProxyCountUpdated(d->modelId, i++, total); } // set binding loop flag @@ -273,7 +263,6 @@ void QmlProfilerStatisticsModel::loadData(qint64 rangeStart, qint64 rangeEnd) d->data.insert(-1, rootEvent); - d->modelManager->modelProxyCountUpdated(d->modelId, 1, 1); emit dataAvailable(); } |