QmlProfiler: switch storage for typeId and selectionId

The selectionIds are an integral part of the timeline and have to be
given for each event. The typeIds are optional. Thus it makes more
sense to store the selectionIds in the basic Range classes and have the
derived models handle the typeIds instead of doing it the other way
around.

Change-Id: I824224b6f58e8d45311134887482586283fbff41
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2014-10-28 14:26:57 +01:00
committed by Ulf Hermann
parent 4ec75995f8
commit 307d45ecaa
7 changed files with 68 additions and 51 deletions

View File

@@ -57,14 +57,14 @@ public:
struct QmlPaintEventData {
int framerate;
int animationcount;
QmlDebug::AnimationThread threadId;
int typeId;
};
QmlProfilerAnimationsModel(QObject *parent = 0);
int rowMaxValue(int rowNumber) const;
int selectionId(int index) const;
int typeId(int index) const;
int row(int index) const;
QColor color(int index) const;
@@ -84,7 +84,7 @@ private:
QVector<QmlProfilerAnimationsModel::QmlPaintEventData> m_data;
int m_maxGuiThreadAnimations;
int m_maxRenderThreadAnimations;
int rowFromThreadId(QmlDebug::AnimationThread threadId) const;
int rowFromThreadId(int threadId) const;
};
}