forked from qt-creator/qt-creator
QmlProfiler: Rename all the timeline model data structs to Item
This allows us to define a template for filling a QmlProfilerTimelineModel without spelling out all the type names. Change-Id: I97870287a795d95f58a949729afa715f145817bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -35,6 +35,13 @@ class DebugMessagesModel : public QmlProfilerTimelineModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
struct Item {
|
||||
Item(const QString &text = QString(), int typeId = -1) :
|
||||
text(text), typeId(typeId) {}
|
||||
QString text;
|
||||
int typeId;
|
||||
};
|
||||
|
||||
DebugMessagesModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *parent);
|
||||
|
||||
int typeId(int index) const override;
|
||||
@@ -51,15 +58,8 @@ public:
|
||||
private:
|
||||
static QString messageType(uint i);
|
||||
|
||||
struct MessageData {
|
||||
MessageData(const QString &text = QString(), int typeId = -1) :
|
||||
text(text), typeId(typeId) {}
|
||||
QString text;
|
||||
int typeId;
|
||||
};
|
||||
|
||||
int m_maximumMsgType;
|
||||
QVector<MessageData> m_data;
|
||||
QVector<Item> m_data;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user