forked from qt-creator/qt-creator
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 <joerg.bornemann@qt.io>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user