Commit adada0b9 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Unify handling of category labels



Change-Id: I32ab2e354d3e45653e8dcb2cf8b0195d199786a6
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent f3267b88
......@@ -44,6 +44,14 @@ void AbstractTimelineModel::setModelManager(QmlProfilerModelManager *modelManage
m_modelId = modelManager->registerModelProxy();
}
QStringList AbstractTimelineModel::categoryTitles() const
{
QStringList retString;
for (int i = 0; i < categories(); i++)
retString << categoryLabel(i);
return retString;
}
qint64 AbstractTimelineModel::traceStartTime() const
{
return m_modelManager->traceTime()->startTime();
......
......@@ -51,7 +51,7 @@ public:
void setModelManager(QmlProfilerModelManager *modelManager);
virtual int categories() const = 0;
virtual QStringList categoryTitles() const = 0;
QStringList categoryTitles() const;
virtual QString name() const = 0;
virtual int count() const = 0;
......
......@@ -82,14 +82,6 @@ int PaintEventsModelProxy::categories() const
return categoryCount();
}
QStringList PaintEventsModelProxy::categoryTitles() const
{
QStringList retString;
for (int i=0; i<categories(); i++)
retString << categoryLabel(i);
return retString;
}
QString PaintEventsModelProxy::name() const
{
return QLatin1String("PaintEventsModelProxy");
......
......@@ -65,7 +65,6 @@ public:
int categories() const;
QStringList categoryTitles() const;
QString name() const;
void loadData();
......
......@@ -89,14 +89,6 @@ int BasicTimelineModel::categories() const
return categoryCount();
}
QStringList BasicTimelineModel::categoryTitles() const
{
QStringList retString;
for (int i=0; i<categories(); i++)
retString << categoryLabel(i);
return retString;
}
QString BasicTimelineModel::name() const
{
return QLatin1String("BasicTimelineModel");
......
......@@ -84,7 +84,6 @@ public:
int categories() const;
QStringList categoryTitles() const;
QString name() const;
void loadData();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment