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

QmlProfiler: Add some consistency to input events model



Methods that are public in the base class should also be public in the
derived class. Also, the accepted() method takes a type, not an event.

Change-Id: I086d382ffc2e71c7efda56b0dbf341942986582c
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent b4462c25
......@@ -167,10 +167,10 @@ void InputEventsModel::clear()
QmlProfilerTimelineModel::clear();
}
bool InputEventsModel::accepted(const QmlEventType &event) const
bool InputEventsModel::accepted(const QmlEventType &type) const
{
return QmlProfilerTimelineModel::accepted(event) &&
(event.detailType == Mouse || event.detailType == Key);
return QmlProfilerTimelineModel::accepted(type) &&
(type.detailType == Mouse || type.detailType == Key);
}
InputEventsModel::InputEvent::InputEvent(InputEventType type, int a, int b) :
......
......@@ -34,12 +34,6 @@ class InputEventsModel : public QmlProfilerTimelineModel
{
Q_OBJECT
protected:
bool accepted(const QmlEventType &event) const override;
void loadEvent(const QmlEvent &event, const QmlEventType &type) override;
void finalize() override;
void clear() override;
public:
struct InputEvent {
InputEvent(InputEventType type = MaximumInputEventType, int a = 0, int b = 0);
......@@ -50,6 +44,11 @@ public:
InputEventsModel(QmlProfilerModelManager *manager, QObject *parent = 0);
bool accepted(const QmlEventType &type) const override;
void loadEvent(const QmlEvent &event, const QmlEventType &type) override;
void finalize() override;
void clear() override;
int typeId(int index) const override;
QColor color(int index) const override;
QVariantList labels() const override;
......
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