Commit 00e6285e authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Rename occurrences of "title" to "displayName"



Also, remove categoryTitles() which isn't used anywhere.

Change-Id: I919abf1221fb71d407eb04190d27180ed39b7b45
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 2e69cb1c
......@@ -33,7 +33,7 @@
namespace QmlProfiler {
AbstractTimelineModel::AbstractTimelineModel(AbstractTimelineModelPrivate *dd,
const QString &label, QmlDebug::Message message, QmlDebug::RangeType rangeType,
const QString &displayName, QmlDebug::Message message, QmlDebug::RangeType rangeType,
QObject *parent) :
QObject(parent), d_ptr(dd)
{
......@@ -42,7 +42,7 @@ AbstractTimelineModel::AbstractTimelineModel(AbstractTimelineModelPrivate *dd,
d->modelId = 0;
d->modelManager = 0;
d->expanded = false;
d->title = label;
d->displayName = displayName;
d->message = message;
d->rangeType = rangeType;
}
......@@ -266,10 +266,10 @@ void AbstractTimelineModel::setExpanded(bool expanded)
}
}
const QString AbstractTimelineModel::title() const
QString AbstractTimelineModel::displayName() const
{
Q_D(const AbstractTimelineModel);
return d->title;
return d->displayName;
}
}
......@@ -71,7 +71,7 @@ public:
bool eventAccepted(const QmlProfilerDataModel::QmlEventTypeData &event) const;
bool expanded() const;
void setExpanded(bool expanded);
const QString title() const;
QString displayName() const;
// Methods that have to be implemented by child models
virtual int rowCount() const = 0;
......@@ -123,7 +123,7 @@ protected:
return QColor::fromHsl(hue % 360, Saturation, Lightness);
}
explicit AbstractTimelineModel(AbstractTimelineModelPrivate *dd, const QString &label,
explicit AbstractTimelineModel(AbstractTimelineModelPrivate *dd, const QString &displayName,
QmlDebug::Message message, QmlDebug::RangeType rangeType,
QObject *parent);
AbstractTimelineModelPrivate *d_ptr;
......
......@@ -51,7 +51,7 @@ public:
QmlProfilerModelManager *modelManager;
int modelId;
bool expanded;
QString title;
QString displayName;
QmlDebug::Message message;
QmlDebug::RangeType rangeType;
......
......@@ -33,7 +33,7 @@ import QtQuick.Controls.Styles 1.2
Item {
id: labelContainer
property string text: qmlProfilerModelProxy.title(modelIndex)
property string text: qmlProfilerModelProxy.displayName(modelIndex)
property bool expanded: trigger(qmlProfilerModelProxy.expanded(modelIndex))
property int modelIndex: index
property int bindingTrigger: 1
......
......@@ -65,7 +65,7 @@ Item {
function showInfo(eventData) {
eventInfo.clear();
rangeDetails.dialogTitle = eventData[0]["title"];
rangeDetails.dialogTitle = eventData[0].displayName;
for (var i = 1; i < eventData.length; i++) {
for (var k in eventData[i]) {
if (eventData[i][k].length > 0) {
......
......@@ -244,7 +244,7 @@ const QVariantList PaintEventsModelProxy::getEventDetails(int index) const
static const char trContext[] = "RangeDetails";
{
QVariantMap valuePair;
valuePair.insert(QLatin1String("title"), QVariant(title()));
valuePair.insert(QLatin1String("displayName"), QVariant(displayName()));
result << valuePair;
}
......
......@@ -298,7 +298,7 @@ const QVariantList RangeTimelineModel::getEventDetails(int index) const
static const char trContext[] = "RangeDetails";
{
QVariantMap valuePair;
valuePair.insert(QLatin1String("title"), QVariant(categoryLabel(d->rangeType)));
valuePair.insert(QLatin1String("displayName"), QVariant(categoryLabel(d->rangeType)));
result << valuePair;
}
......
......@@ -94,14 +94,6 @@ void TimelineModelAggregator::addModel(AbstractTimelineModel *m)
connect(m,SIGNAL(rowHeightChanged()),this,SIGNAL(rowHeightChanged()));
}
QStringList TimelineModelAggregator::categoryTitles() const
{
QStringList retString;
foreach (const AbstractTimelineModel *modelProxy, d->modelList)
retString << modelProxy->title();
return retString;
}
int TimelineModelAggregator::count(int modelIndex) const
{
if (modelIndex == -1) {
......@@ -158,9 +150,9 @@ int TimelineModelAggregator::rowCount(int modelIndex) const
return d->modelList[modelIndex]->rowCount();
}
const QString TimelineModelAggregator::title(int modelIndex) const
QString TimelineModelAggregator::displayName(int modelIndex) const
{
return d->modelList[modelIndex]->title();
return d->modelList[modelIndex]->displayName();
}
int TimelineModelAggregator::rowMinValue(int modelIndex, int row) const
......
......@@ -46,7 +46,6 @@ public:
void setModelManager(QmlProfilerModelManager *modelManager);
void addModel(AbstractTimelineModel *m);
Q_INVOKABLE QStringList categoryTitles() const;
Q_INVOKABLE int count(int modelIndex = -1) const;
void clear();
Q_INVOKABLE int modelCount() const;
......@@ -64,7 +63,7 @@ public:
Q_INVOKABLE bool expanded(int modelIndex) const;
Q_INVOKABLE void setExpanded(int modelIndex, bool expanded);
Q_INVOKABLE int rowCount(int modelIndex) const;
Q_INVOKABLE const QString title(int modelIndex) const;
Q_INVOKABLE QString displayName(int modelIndex) const;
Q_INVOKABLE int rowMinValue(int modelIndex, int row) const;
Q_INVOKABLE int rowMaxValue(int modelIndex, int row) const;
......
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