forked from qt-creator/qt-creator
QmlProfiler: Don't expose the vector of event types
We always want either the total number of event types or one specific type. There is no need to expose the fact that we keep them as a vector. Also, use int as the type of the "number" methods as that aligns better with Qt containers, and rename the methods. We don't need to state the fact that we've loaded the events and types at some point. Change-Id: Iaf680ec9fa10e1070ddee6bcc079800e401775f0 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -79,7 +79,7 @@ public:
|
||||
int numRegisteredModels = 0;
|
||||
int numFinishedFinalizers = 0;
|
||||
|
||||
uint numLoadedEvents = 0;
|
||||
int numLoadedEvents = 0;
|
||||
quint64 availableFeatures = 0;
|
||||
quint64 visibleFeatures = 0;
|
||||
quint64 recordedFeatures = 0;
|
||||
@@ -183,12 +183,12 @@ bool QmlProfilerModelManager::isEmpty() const
|
||||
return d->file.pos() == 0;
|
||||
}
|
||||
|
||||
uint QmlProfilerModelManager::numLoadedEvents() const
|
||||
int QmlProfilerModelManager::numEvents() const
|
||||
{
|
||||
return d->numLoadedEvents;
|
||||
}
|
||||
|
||||
uint QmlProfilerModelManager::numLoadedEventTypes() const
|
||||
int QmlProfilerModelManager::numEventTypes() const
|
||||
{
|
||||
return d->eventTypes.count();
|
||||
}
|
||||
@@ -254,9 +254,9 @@ void QmlProfilerModelManager::addEventType(const QmlEventType &type)
|
||||
}
|
||||
}
|
||||
|
||||
const QVector<QmlEventType> &QmlProfilerModelManager::eventTypes() const
|
||||
const QmlEventType &QmlProfilerModelManager::eventType(int typeId) const
|
||||
{
|
||||
return d->eventTypes;
|
||||
return d->eventTypes.at(typeId);
|
||||
}
|
||||
|
||||
static bool isStateful(const QmlEventType &type)
|
||||
|
||||
Reference in New Issue
Block a user