Adapt to adding of main feature to QmlProfilerTimelineModel

Change-Id: I54e2037106c8f0f5a0115cb415633acc8f0a879b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-06-30 16:39:58 +02:00
parent cc5fe6a00e
commit ceb8f6a9ed
4 changed files with 10 additions and 17 deletions

View File

@@ -26,12 +26,10 @@ namespace Internal {
using namespace QmlProfiler; using namespace QmlProfiler;
InputEventsModel::InputEventsModel(QmlProfilerModelManager *manager, QObject *parent) : InputEventsModel::InputEventsModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlProfilerTimelineModel(manager, QmlDebug::Event, QmlDebug::MaximumRangeType,
tr(QmlProfilerModelManager::featureName(QmlDebug::ProfileInputEvents)), QmlDebug::ProfileInputEvents, parent),
QmlDebug::Event, QmlDebug::MaximumRangeType, parent), m_keyTypeId(-1), m_mouseTypeId(-1)
m_keyTypeId(-1), m_mouseTypeId(-1)
{ {
announceFeatures(1 << QmlDebug::ProfileInputEvents);
} }
int InputEventsModel::typeId(int index) const int InputEventsModel::typeId(int index) const

View File

@@ -28,12 +28,11 @@ namespace Internal {
using namespace QmlProfiler; using namespace QmlProfiler;
MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, QObject *parent) : MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlProfilerTimelineModel(manager, QmlDebug::MemoryAllocation, QmlDebug::MaximumRangeType,
tr(QmlProfilerModelManager::featureName(QmlDebug::ProfileMemory)), QmlDebug::ProfileMemory, parent)
QmlDebug::MemoryAllocation, QmlDebug::MaximumRangeType, parent)
{ {
m_maxSize = 1; m_maxSize = 1;
announceFeatures((1 << QmlDebug::ProfileMemory) | QmlDebug::Constants::QML_JS_RANGE_FEATURES); announceFeatures((1ULL << mainFeature()) | QmlDebug::Constants::QML_JS_RANGE_FEATURES);
} }
int MemoryUsageModel::rowMaxValue(int rowNumber) const int MemoryUsageModel::rowMaxValue(int rowNumber) const

View File

@@ -26,12 +26,10 @@ namespace Internal {
using namespace QmlProfiler; using namespace QmlProfiler;
PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent) : PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent) :
QmlProfilerTimelineModel(manager, QmlProfilerTimelineModel(manager, QmlDebug::PixmapCacheEvent, QmlDebug::MaximumRangeType,
tr(QmlProfilerModelManager::featureName(QmlDebug::ProfilePixmapCache)), QmlDebug::ProfilePixmapCache, parent)
QmlDebug::PixmapCacheEvent, QmlDebug::MaximumRangeType, parent)
{ {
m_maxCacheSize = 1; m_maxCacheSize = 1;
announceFeatures(1 << QmlDebug::ProfilePixmapCache);
} }
int PixmapCacheModel::rowMaxValue(int rowNumber) const int PixmapCacheModel::rowMaxValue(int rowNumber) const

View File

@@ -70,11 +70,9 @@ Q_STATIC_ASSERT(sizeof(StageLabels) ==
SceneGraphTimelineModel::SceneGraphTimelineModel(QmlProfilerModelManager *manager, SceneGraphTimelineModel::SceneGraphTimelineModel(QmlProfilerModelManager *manager,
QObject *parent) : QObject *parent) :
QmlProfilerTimelineModel(manager, QmlProfilerTimelineModel(manager, QmlDebug::SceneGraphFrame, QmlDebug::MaximumRangeType,
tr(QmlProfilerModelManager::featureName(QmlDebug::ProfileSceneGraph)), QmlDebug::ProfileSceneGraph, parent)
QmlDebug::SceneGraphFrame, QmlDebug::MaximumRangeType, parent)
{ {
announceFeatures(1 << QmlDebug::ProfileSceneGraph);
} }
int SceneGraphTimelineModel::expandedRow(int index) const int SceneGraphTimelineModel::expandedRow(int index) const