diff --git a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp index dfb462bed4f..233a3d7c2d5 100644 --- a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp @@ -167,6 +167,20 @@ int PaintEventsModelProxy::getEventRow(int index) const return (threadId == QmlDebug::GuiThread || d->maxGuiThreadAnimations == 0) ? 1 : 2; } +int PaintEventsModelProxy::rowMaxValue(int rowNumber) const +{ + Q_D(const PaintEventsModelProxy); + switch (rowNumber) { + case 1: + return d->maxGuiThreadAnimations > 0 ? d->maxGuiThreadAnimations : + d->maxRenderThreadAnimations; + case 2: + return d->maxRenderThreadAnimations; + default: + return AbstractTimelineModel::rowMaxValue(rowNumber); + } +} + int PaintEventsModelProxy::getEventId(int index) const { Q_D(const PaintEventsModelProxy); @@ -189,7 +203,7 @@ float PaintEventsModelProxy::getHeight(int index) const Q_D(const PaintEventsModelProxy); const PaintEventsModelProxyPrivate::Range &range = d->range(index); return (float)range.animationcount / (float)(range.threadId == QmlDebug::GuiThread ? - d->maxGuiThreadAnimations : d->maxRenderThreadAnimations) * 0.85f + 0.15f; + d->maxGuiThreadAnimations : d->maxRenderThreadAnimations); } const QVariantList PaintEventsModelProxy::getLabels() const diff --git a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h index 77df1a3fc4f..eb5b5b0d378 100644 --- a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h +++ b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h @@ -64,6 +64,8 @@ public: void loadData(); void clear(); + int rowMaxValue(int rowNumber) const; + Q_INVOKABLE int rowCount() const; Q_INVOKABLE int getEventId(int index) const; int getEventRow(int index) const;