CLinkModel: Make use of in-class initializers where applicable
This commit is contained in:
parent
48bef1f346
commit
28e6efb060
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
CLinkModel::CLinkModel(QObject *pParent)
|
CLinkModel::CLinkModel(QObject *pParent)
|
||||||
: QAbstractTableModel(pParent)
|
: QAbstractTableModel(pParent)
|
||||||
, mpObject(nullptr)
|
|
||||||
, mType(ELinkType::Outgoing)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,17 +8,18 @@ class CLinkModel : public QAbstractTableModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
CScriptObject *mpObject;
|
CScriptObject *mpObject = nullptr;
|
||||||
ELinkType mType;
|
ELinkType mType{ELinkType::Outgoing};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CLinkModel(QObject *pParent = 0);
|
explicit CLinkModel(QObject *pParent = nullptr);
|
||||||
|
|
||||||
void SetObject(CScriptObject *pObj);
|
void SetObject(CScriptObject *pObj);
|
||||||
void SetConnectionType(ELinkType Type);
|
void SetConnectionType(ELinkType Type);
|
||||||
int rowCount(const QModelIndex& rkParent = QModelIndex()) const;
|
int rowCount(const QModelIndex& rkParent = QModelIndex()) const override;
|
||||||
int columnCount(const QModelIndex& rkParent) const;
|
int columnCount(const QModelIndex& rkParent) const override;
|
||||||
QVariant data(const QModelIndex& rkIndex, int Role) const;
|
QVariant data(const QModelIndex& rkIndex, int Role) const override;
|
||||||
QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const;
|
QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CCONNECTIONMODEL_H
|
#endif // CCONNECTIONMODEL_H
|
||||||
|
|
Loading…
Reference in New Issue