QmlProfiler: Don't modify height of timeline items based on row height

When precomputing all timeline items in advance we cannot react to
height changes later

Change-Id: Ib038fb59581fe8367c1c550839a728f371005ab6
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2014-11-27 13:40:04 +01:00
parent 6b08ff6bc4
commit c34ad1dc5b

View File

@@ -174,16 +174,9 @@ QColor QmlProfilerAnimationsModel::color(int index) const
float QmlProfilerAnimationsModel::relativeHeight(int index) const
{
const int thread = selectionId(index);
// Add some height to the events if we're far from the scale threshold of 2 * DefaultRowHeight.
// Like that you can see the smaller events more easily.
int scaleThreshold = 2 * defaultRowHeight() - rowHeight(rowFromThreadId(thread));
float boost = scaleThreshold > 0 ? (0.15 * scaleThreshold / defaultRowHeight()) : 0;
return boost + (1.0 - boost) * (float)m_data[index].animationcount /
(float)(thread == QmlDebug::GuiThread ? m_maxGuiThreadAnimations :
m_maxRenderThreadAnimations);
return (float)m_data[index].animationcount / (float)(selectionId(index) == QmlDebug::GuiThread ?
m_maxGuiThreadAnimations :
m_maxRenderThreadAnimations);
}
QVariantList QmlProfilerAnimationsModel::labels() const