forked from qt-creator/qt-creator
Adapt to renaming of get* and find* methods
Change-Id: I470bcaaf53a6184ae35369484337b247bf17f52e Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -59,7 +59,7 @@ int MemoryUsageModel::rowMaxValue(int rowNumber) const
|
||||
return d->maxSize;
|
||||
}
|
||||
|
||||
int MemoryUsageModel::getEventRow(int index) const
|
||||
int MemoryUsageModel::row(int index) const
|
||||
{
|
||||
Q_D(const MemoryUsageModel);
|
||||
QmlDebug::MemoryType type = d->range(index).type;
|
||||
@@ -69,24 +69,24 @@ int MemoryUsageModel::getEventRow(int index) const
|
||||
return 2;
|
||||
}
|
||||
|
||||
int MemoryUsageModel::getEventId(int index) const
|
||||
int MemoryUsageModel::eventId(int index) const
|
||||
{
|
||||
Q_D(const MemoryUsageModel);
|
||||
return d->range(index).type;
|
||||
}
|
||||
|
||||
QColor MemoryUsageModel::getColor(int index) const
|
||||
QColor MemoryUsageModel::color(int index) const
|
||||
{
|
||||
return getEventColor(index);
|
||||
return colorByEventId(index);
|
||||
}
|
||||
|
||||
float MemoryUsageModel::getHeight(int index) const
|
||||
float MemoryUsageModel::height(int index) const
|
||||
{
|
||||
Q_D(const MemoryUsageModel);
|
||||
return qMin(1.0f, (float)d->range(index).size / (float)d->maxSize);
|
||||
}
|
||||
|
||||
const QVariantMap MemoryUsageModel::getEventLocation(int index) const
|
||||
QVariantMap MemoryUsageModel::location(int index) const
|
||||
{
|
||||
static const QLatin1String file("file");
|
||||
static const QLatin1String line("line");
|
||||
@@ -108,7 +108,7 @@ const QVariantMap MemoryUsageModel::getEventLocation(int index) const
|
||||
return result;
|
||||
}
|
||||
|
||||
const QVariantList MemoryUsageModel::getLabels() const
|
||||
QVariantList MemoryUsageModel::labels() const
|
||||
{
|
||||
Q_D(const MemoryUsageModel);
|
||||
QVariantList result;
|
||||
@@ -134,7 +134,7 @@ const QVariantList MemoryUsageModel::getLabels() const
|
||||
return result;
|
||||
}
|
||||
|
||||
const QVariantList MemoryUsageModel::getEventDetails(int index) const
|
||||
QVariantList MemoryUsageModel::details(int index) const
|
||||
{
|
||||
Q_D(const MemoryUsageModel);
|
||||
|
||||
@@ -200,7 +200,7 @@ void MemoryUsageModel::loadData()
|
||||
const QmlProfilerDataModel::QmlEventTypeData &type = types[event.typeIndex];
|
||||
while (!rangeStack.empty() && rangeStack.top().endTime < event.startTime)
|
||||
rangeStack.pop();
|
||||
if (!eventAccepted(type)) {
|
||||
if (!accepted(type)) {
|
||||
if (type.rangeType != QmlDebug::MaximumRangeType) {
|
||||
rangeStack.push(RangeStackFrame(event.typeIndex, event.startTime,
|
||||
event.startTime + event.duration));
|
||||
|
@@ -53,15 +53,15 @@ public:
|
||||
int rowCount() const;
|
||||
int rowMaxValue(int rowNumber) const;
|
||||
|
||||
int getEventRow(int index) const;
|
||||
int getEventId(int index) const;
|
||||
QColor getColor(int index) const;
|
||||
float getHeight(int index) const;
|
||||
int row(int index) const;
|
||||
int eventId(int index) const;
|
||||
QColor color(int index) const;
|
||||
float height(int index) const;
|
||||
|
||||
const QVariantMap getEventLocation(int index) const;
|
||||
QVariantMap location(int index) const;
|
||||
|
||||
const QVariantList getLabels() const;
|
||||
const QVariantList getEventDetails(int index) const;
|
||||
QVariantList labels() const;
|
||||
QVariantList details(int index) const;
|
||||
|
||||
void loadData();
|
||||
void clear();
|
||||
|
@@ -111,31 +111,31 @@ int PixmapCacheModel::rowMaxValue(int rowNumber) const
|
||||
}
|
||||
}
|
||||
|
||||
int PixmapCacheModel::getEventRow(int index) const
|
||||
int PixmapCacheModel::row(int index) const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
if (d->expanded)
|
||||
return getEventId(index) + 1;
|
||||
return eventId(index) + 1;
|
||||
return d->range(index).rowNumberCollapsed;
|
||||
}
|
||||
|
||||
int PixmapCacheModel::getEventId(int index) const
|
||||
int PixmapCacheModel::eventId(int index) const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
return d->range(index).pixmapEventType == PixmapCacheCountChanged ?
|
||||
0 : d->range(index).urlIndex + 1;
|
||||
}
|
||||
|
||||
QColor PixmapCacheModel::getColor(int index) const
|
||||
QColor PixmapCacheModel::color(int index) const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
if (d->range(index).pixmapEventType == PixmapCacheCountChanged)
|
||||
return getColorByHue(PixmapCacheCountHue);
|
||||
return colorByHue(PixmapCacheCountHue);
|
||||
|
||||
return getEventColor(index);
|
||||
return colorByEventId(index);
|
||||
}
|
||||
|
||||
float PixmapCacheModel::getHeight(int index) const
|
||||
float PixmapCacheModel::height(int index) const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
if (d->range(index).pixmapEventType == PixmapCacheCountChanged)
|
||||
@@ -152,7 +152,7 @@ QString getFilenameOnly(QString absUrl)
|
||||
return absUrl;
|
||||
}
|
||||
|
||||
const QVariantList PixmapCacheModel::getLabels() const
|
||||
QVariantList PixmapCacheModel::labels() const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
QVariantList result;
|
||||
@@ -190,7 +190,7 @@ void PixmapCacheModel::PixmapCacheModelPrivate::addVP(QVariantList &l, QString l
|
||||
}
|
||||
}
|
||||
|
||||
const QVariantList PixmapCacheModel::getEventDetails(int index) const
|
||||
QVariantList PixmapCacheModel::details(int index) const
|
||||
{
|
||||
Q_D(const PixmapCacheModel);
|
||||
QVariantList result;
|
||||
@@ -285,7 +285,7 @@ void PixmapCacheModel::loadData()
|
||||
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types = simpleModel->getEventTypes();
|
||||
foreach (const QmlProfilerDataModel::QmlEventData &event, simpleModel->getEvents()) {
|
||||
const QmlProfilerDataModel::QmlEventTypeData &type = types[event.typeIndex];
|
||||
if (!eventAccepted(type))
|
||||
if (!accepted(type))
|
||||
continue;
|
||||
|
||||
PixmapCacheEvent newEvent;
|
||||
|
@@ -58,14 +58,14 @@ public:
|
||||
int rowCount() const;
|
||||
int rowMaxValue(int rowNumber) const;
|
||||
|
||||
int getEventRow(int index) const;
|
||||
Q_INVOKABLE int getEventId(int index) const;
|
||||
Q_INVOKABLE QColor getColor(int index) const;
|
||||
Q_INVOKABLE float getHeight(int index) const;
|
||||
int row(int index) const;
|
||||
int eventId(int index) const;
|
||||
QColor color(int index) const;
|
||||
float height(int index) const;
|
||||
|
||||
const QVariantList getLabels() const;
|
||||
QVariantList labels() const;
|
||||
|
||||
Q_INVOKABLE const QVariantList getEventDetails(int index) const;
|
||||
QVariantList details(int index) const;
|
||||
|
||||
void loadData();
|
||||
void clear();
|
||||
|
@@ -79,22 +79,22 @@ int SceneGraphTimelineModel::rowCount() const
|
||||
return d->seenPolishAndSync ? 3 : 2;
|
||||
}
|
||||
|
||||
int SceneGraphTimelineModel::getEventRow(int index) const
|
||||
int SceneGraphTimelineModel::row(int index) const
|
||||
{
|
||||
Q_D(const SceneGraphTimelineModel);
|
||||
return d->seenPolishAndSync ? d->range(index).sgEventType + 1 : 1;
|
||||
}
|
||||
|
||||
int SceneGraphTimelineModel::getEventId(int index) const
|
||||
int SceneGraphTimelineModel::eventId(int index) const
|
||||
{
|
||||
Q_D(const SceneGraphTimelineModel);
|
||||
return d->seenPolishAndSync ? d->range(index).sgEventType : SceneGraphGUIThread;
|
||||
}
|
||||
|
||||
QColor SceneGraphTimelineModel::getColor(int index) const
|
||||
QColor SceneGraphTimelineModel::color(int index) const
|
||||
{
|
||||
// get duration in seconds
|
||||
double eventDuration = getDuration(index) / 1e9;
|
||||
double eventDuration = duration(index) / 1e9;
|
||||
|
||||
// supposedly never above 60 frames per second
|
||||
// limit it in that case
|
||||
@@ -105,7 +105,7 @@ QColor SceneGraphTimelineModel::getColor(int index) const
|
||||
double fpsFraction = 1 / (eventDuration * 60.0);
|
||||
if (fpsFraction > 1.0)
|
||||
fpsFraction = 1.0;
|
||||
return getFractionColor(fpsFraction);
|
||||
return colorByFraction(fpsFraction);
|
||||
}
|
||||
|
||||
QString labelForSGType(int t)
|
||||
@@ -119,7 +119,7 @@ QString labelForSGType(int t)
|
||||
}
|
||||
}
|
||||
|
||||
const QVariantList SceneGraphTimelineModel::getLabels() const
|
||||
QVariantList SceneGraphTimelineModel::labels() const
|
||||
{
|
||||
Q_D(const SceneGraphTimelineModel);
|
||||
QVariantList result;
|
||||
@@ -154,8 +154,7 @@ void SceneGraphTimelineModel::SceneGraphTimelineModelPrivate::addVP(QVariantList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const QVariantList SceneGraphTimelineModel::getEventDetails(int index) const
|
||||
QVariantList SceneGraphTimelineModel::details(int index) const
|
||||
{
|
||||
Q_D(const SceneGraphTimelineModel);
|
||||
QVariantList result;
|
||||
@@ -214,7 +213,7 @@ void SceneGraphTimelineModel::loadData()
|
||||
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types = simpleModel->getEventTypes();
|
||||
foreach (const QmlProfilerDataModel::QmlEventData &event, simpleModel->getEvents()) {
|
||||
const QmlProfilerDataModel::QmlEventTypeData &type = types[event.typeIndex];
|
||||
if (!eventAccepted(type))
|
||||
if (!accepted(type))
|
||||
continue;
|
||||
|
||||
if (type.detailType == SceneGraphRenderLoopFrame) {
|
||||
|
@@ -45,13 +45,13 @@ public:
|
||||
|
||||
int rowCount() const;
|
||||
|
||||
int getEventRow(int index) const;
|
||||
Q_INVOKABLE int getEventId(int index) const;
|
||||
Q_INVOKABLE QColor getColor(int index) const;
|
||||
int row(int index) const;
|
||||
int eventId(int index) const;
|
||||
QColor color(int index) const;
|
||||
|
||||
const QVariantList getLabels() const;
|
||||
QVariantList labels() const;
|
||||
|
||||
Q_INVOKABLE const QVariantList getEventDetails(int index) const;
|
||||
QVariantList details(int index) const;
|
||||
|
||||
void loadData();
|
||||
void clear();
|
||||
|
Reference in New Issue
Block a user