From 34db18aff553d3df38915a27a5b017878dc5b423 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Jun 2020 04:57:35 -0400 Subject: [PATCH] CPropertyView: Make use of in-class initializers where applicable --- src/Editor/PropertyEdit/CPropertyView.cpp | 1 - src/Editor/PropertyEdit/CPropertyView.h | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Editor/PropertyEdit/CPropertyView.cpp b/src/Editor/PropertyEdit/CPropertyView.cpp index b09691ae..b380f176 100644 --- a/src/Editor/PropertyEdit/CPropertyView.cpp +++ b/src/Editor/PropertyEdit/CPropertyView.cpp @@ -9,7 +9,6 @@ CPropertyView::CPropertyView(QWidget *pParent) : QTreeView(pParent) - , mpMenuProperty(nullptr) { mpModel = new CPropertyModel(this); mpDelegate = new CPropertyDelegate(this); diff --git a/src/Editor/PropertyEdit/CPropertyView.h b/src/Editor/PropertyEdit/CPropertyView.h index 7ed04561..16b56d0d 100644 --- a/src/Editor/PropertyEdit/CPropertyView.h +++ b/src/Editor/PropertyEdit/CPropertyView.h @@ -14,7 +14,7 @@ class CPropertyView : public QTreeView CPropertyDelegate* mpDelegate; CScriptObject* mpObject; - IProperty* mpMenuProperty; + IProperty* mpMenuProperty = nullptr; QAction* mpShowNameValidityAction; QAction* mpEditTemplateAction; QAction* mpGenNamesForPropertyAction; @@ -22,10 +22,11 @@ class CPropertyView : public QTreeView QAction* mpGenNamesForChildrenAction; public: - CPropertyView(QWidget* pParent = 0); - void setModel(QAbstractItemModel* pModel); - bool event(QEvent* pEvent); - int sizeHintForColumn(int Column) const; + explicit CPropertyView(QWidget* pParent = nullptr); + + void setModel(QAbstractItemModel* pModel) override; + bool event(QEvent* pEvent) override; + int sizeHintForColumn(int Column) const override; void SetEditor(IEditor* pEditor); void ClearProperties(); @@ -33,7 +34,7 @@ public: void SetInstance(CScriptObject* pObj); void UpdateEditorProperties(const QModelIndex& rkParent); - inline CPropertyModel* PropertyModel() const { return mpModel; } + CPropertyModel* PropertyModel() const { return mpModel; } public slots: void SetPersistentEditors(const QModelIndex& rkIndex);