forked from qt-creator/qt-creator
QmlProfiler: Make members of QmlNote private
The only member that can change after initialization is the text. Change-Id: I6958f510e67c9fd6fe1f109c2676f80d93e7fd0c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -29,16 +29,29 @@
|
||||
|
||||
namespace QmlProfiler {
|
||||
|
||||
struct QmlNote {
|
||||
class QmlNote {
|
||||
|
||||
public:
|
||||
QmlNote(int typeIndex = -1, qint64 startTime = -1, qint64 duration = -1,
|
||||
const QString &text = QString()) :
|
||||
typeIndex(typeIndex), startTime(startTime), duration(duration), text(text)
|
||||
m_typeIndex(typeIndex), m_startTime(startTime), m_duration(duration), m_text(text)
|
||||
{}
|
||||
|
||||
int typeIndex;
|
||||
qint64 startTime;
|
||||
qint64 duration;
|
||||
QString text;
|
||||
int typeIndex() const { return m_typeIndex; }
|
||||
qint64 startTime() const { return m_startTime; }
|
||||
qint64 duration() const { return m_duration; }
|
||||
QString text() const { return m_text; }
|
||||
|
||||
void setText(const QString &text) { m_text = text; }
|
||||
|
||||
private:
|
||||
friend QDataStream &operator>>(QDataStream &stream, QmlNote ¬e);
|
||||
friend QDataStream &operator<<(QDataStream &stream, const QmlNote ¬e);
|
||||
|
||||
int m_typeIndex;
|
||||
qint64 m_startTime;
|
||||
qint64 m_duration;
|
||||
QString m_text;
|
||||
};
|
||||
|
||||
QDataStream &operator>>(QDataStream &stream, QmlNote ¬e);
|
||||
|
||||
Reference in New Issue
Block a user