diff --git a/src/Editor/WorldEditor/CPoiMapModel.cpp b/src/Editor/WorldEditor/CPoiMapModel.cpp index 2c252db6..aed622a9 100644 --- a/src/Editor/WorldEditor/CPoiMapModel.cpp +++ b/src/Editor/WorldEditor/CPoiMapModel.cpp @@ -4,11 +4,9 @@ #include #include -CPoiMapModel::CPoiMapModel(CWorldEditor *pEditor, QObject *pParent /*= 0*/) +CPoiMapModel::CPoiMapModel(CWorldEditor *pEditor, QObject *pParent) : QAbstractListModel(pParent) , mpEditor(pEditor) - , mpArea(nullptr) - , mpPoiToWorld(nullptr) { connect(pEditor, SIGNAL(MapChanged(CWorld*,CGameArea*)), this, SLOT(OnMapChange(CWorld*,CGameArea*))); } diff --git a/src/Editor/WorldEditor/CPoiMapModel.h b/src/Editor/WorldEditor/CPoiMapModel.h index 217b2570..8e47514f 100644 --- a/src/Editor/WorldEditor/CPoiMapModel.h +++ b/src/Editor/WorldEditor/CPoiMapModel.h @@ -16,16 +16,17 @@ class CPoiMapModel : public QAbstractListModel Q_OBJECT CWorldEditor *mpEditor; - CGameArea *mpArea; + CGameArea *mpArea = nullptr; TResPtr mpPoiToWorld; QMap*> mModelMap; public: - explicit CPoiMapModel(CWorldEditor *pEditor, QObject *pParent = 0); - QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const; - int rowCount(const QModelIndex& rkParent) const; - QVariant data(const QModelIndex& rkIndex, int Role) const; + explicit CPoiMapModel(CWorldEditor *pEditor, QObject *pParent = nullptr); + + QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const override; + int rowCount(const QModelIndex& rkParent) const override; + QVariant data(const QModelIndex& rkIndex, int Role) const override; void AddPOI(CScriptNode *pPOI); void AddMapping(const QModelIndex& rkIndex, CModelNode *pNode);