CLayerModel: Make use of in-class initializers where applicable
This commit is contained in:
parent
d537cfd4b2
commit
968fc70cbf
|
@ -4,13 +4,10 @@
|
||||||
|
|
||||||
CLayerModel::CLayerModel(QObject *pParent)
|
CLayerModel::CLayerModel(QObject *pParent)
|
||||||
: QAbstractListModel(pParent)
|
: QAbstractListModel(pParent)
|
||||||
, mpArea(nullptr)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CLayerModel::~CLayerModel()
|
CLayerModel::~CLayerModel() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int CLayerModel::rowCount(const QModelIndex& /*parent*/) const
|
int CLayerModel::rowCount(const QModelIndex& /*parent*/) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,10 +9,11 @@ class CLayerModel : public QAbstractListModel
|
||||||
TResPtr<CGameArea> mpArea;
|
TResPtr<CGameArea> mpArea;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CLayerModel(QObject *pParent = 0);
|
explicit CLayerModel(QObject *pParent = nullptr);
|
||||||
~CLayerModel();
|
~CLayerModel() override;
|
||||||
int rowCount(const QModelIndex &parent) const;
|
|
||||||
QVariant data(const QModelIndex &index, int role) const;
|
int rowCount(const QModelIndex &parent) const override;
|
||||||
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
void SetArea(CGameArea *pArea);
|
void SetArea(CGameArea *pArea);
|
||||||
CScriptLayer* Layer(const QModelIndex& index) const;
|
CScriptLayer* Layer(const QModelIndex& index) const;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue