Commit 55f28b97 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: eliminate redundant name() methods.



Change-Id: I6190fb1ba9fb86741362a251ddd3e39357b9a604
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent db7c7559
......@@ -31,7 +31,8 @@
namespace QmlProfiler {
AbstractTimelineModel::AbstractTimelineModel(QObject *parent) : QObject(parent), m_modelManager(0)
AbstractTimelineModel::AbstractTimelineModel(const QString &name, QObject *parent) :
QObject(parent), m_name(name), m_modelManager(0)
{}
AbstractTimelineModel::~AbstractTimelineModel()
......@@ -52,6 +53,11 @@ QStringList AbstractTimelineModel::categoryTitles() const
return retString;
}
QString AbstractTimelineModel::name() const
{
return m_name;
}
qint64 AbstractTimelineModel::traceStartTime() const
{
return m_modelManager->traceTime()->startTime();
......
......@@ -45,13 +45,13 @@ class QMLPROFILER_EXPORT AbstractTimelineModel : public QObject
Q_OBJECT
public:
explicit AbstractTimelineModel(QObject *parent = 0);
explicit AbstractTimelineModel(const QString &name, QObject *parent = 0);
~AbstractTimelineModel();
void setModelManager(QmlProfilerModelManager *modelManager);
QStringList categoryTitles() const;
virtual QString name() const = 0;
QString name() const;
virtual int count() const = 0;
virtual bool isEmpty() const = 0;
......@@ -106,6 +106,7 @@ signals:
void expandedChanged();
protected:
QString m_name;
QmlProfilerModelManager *m_modelManager;
int m_modelId;
......
......@@ -68,7 +68,8 @@ public:
};
PaintEventsModelProxy::PaintEventsModelProxy(QObject *parent)
: AbstractTimelineModel(parent), d(new PaintEventsModelProxyPrivate(this))
: AbstractTimelineModel(QLatin1String("PaintEventsModelProxy"), parent),
d(new PaintEventsModelProxyPrivate(this))
{
}
......@@ -77,11 +78,6 @@ PaintEventsModelProxy::~PaintEventsModelProxy()
delete d;
}
QString PaintEventsModelProxy::name() const
{
return QLatin1String("PaintEventsModelProxy");
}
void PaintEventsModelProxy::clear()
{
d->SortedTimelineModel::clear();
......
......@@ -63,8 +63,6 @@ public:
PaintEventsModelProxy(QObject *parent = 0);
~PaintEventsModelProxy();
QString name() const;
void loadData();
Q_INVOKABLE int count() const;
void clear();
......
......@@ -75,7 +75,8 @@ public:
};
BasicTimelineModel::BasicTimelineModel(QObject *parent)
: AbstractTimelineModel(parent), d(new BasicTimelineModelPrivate(this))
: AbstractTimelineModel(QLatin1String("BasicTimelineModel"), parent),
d(new BasicTimelineModelPrivate(this))
{
}
......@@ -84,11 +85,6 @@ BasicTimelineModel::~BasicTimelineModel()
delete d;
}
QString BasicTimelineModel::name() const
{
return QLatin1String("BasicTimelineModel");
}
void BasicTimelineModel::clear()
{
d->SortedTimelineModel::clear();
......
......@@ -82,8 +82,6 @@ public:
BasicTimelineModel(QObject *parent = 0);
~BasicTimelineModel();
QString name() const;
void loadData();
Q_INVOKABLE int count() const;
void clear();
......
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