Commit 5799901b authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Protect AbstractTimelineModel's loadData() and clear()



They really shouldn't be called from outside. We'll introduce an
"empty" property whose notify signal will depend on data handling to be
done in a controlled way.

Change-Id: I272eaa3638ba571d9f9ffd964b0d33449d0adda1
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 2e11197b
......@@ -73,7 +73,6 @@ public:
virtual QVariantList labels() const = 0;
virtual QVariantMap details(int index) const = 0;
virtual int row(int index) const = 0;
virtual void loadData() = 0;
virtual quint64 features() const = 0;
// Methods which can optionally be implemented by child models.
......@@ -85,7 +84,6 @@ public:
virtual float relativeHeight(int index) const;
virtual int rowMinValue(int rowNumber) const;
virtual int rowMaxValue(int rowNumber) const;
virtual void clear();
signals:
void expandedChanged();
......@@ -122,6 +120,9 @@ protected:
QObject *parent);
AbstractTimelineModelPrivate *d_ptr;
virtual void loadData() = 0;
virtual void clear();
protected slots:
void dataChanged();
......
......@@ -61,9 +61,6 @@ public:
PaintEventsModelProxy(QObject *parent = 0);
void loadData();
void clear();
int rowMaxValue(int rowNumber) const;
int eventId(int index) const;
......@@ -76,9 +73,12 @@ public:
QVariantMap details(int index) const;
quint64 features() const;
private slots:
bool accepted(const QmlProfilerDataModel::QmlEventTypeData &event) const;
protected:
void loadData();
void clear();
private:
class PaintEventsModelProxyPrivate;
Q_DECLARE_PRIVATE(PaintEventsModelProxy)
......
......@@ -65,9 +65,6 @@ public:
RangeTimelineModel(QmlDebug::RangeType rangeType, QObject *parent = 0);
void loadData();
void clear();
static QString categoryLabel(QmlDebug::RangeType categoryIndex);
quint64 features() const;
......@@ -83,6 +80,10 @@ public:
int eventIdForTypeIndex(int typeIndex) const;
int eventIdForLocation(const QString &filename, int line, int column) const;
protected:
void loadData();
void clear();
private:
class RangeTimelineModelPrivate;
Q_DECLARE_PRIVATE(RangeTimelineModel)
......
......@@ -53,6 +53,7 @@ public:
QVariantMap details(int) const { return QVariantMap(); }
int row(int) const { return 1; }
void loadData();
void clear() { AbstractTimelineModel::clear(); }
// Make some protected methods public
......
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