From b83fa38ac920a7e7f6fe7d6dbe816bb91029c68f Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 27 Dec 2016 18:15:07 +0300 Subject: [PATCH] Update source formatting --- src/Model/Model_ResultField.h | 2 +- src/XGUI/XGUI_DataModel.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Model/Model_ResultField.h b/src/Model/Model_ResultField.h index 315484297..38de177a1 100644 --- a/src/Model/Model_ResultField.h +++ b/src/Model/Model_ResultField.h @@ -25,7 +25,7 @@ public: class Model_FieldStep : public ModelAPI_ResultField::ModelAPI_FieldStep { public: - Model_FieldStep(ModelAPI_ResultField* theParent, int theId) + Model_FieldStep(ModelAPI_ResultField* theParent, int theId) : myParent(theParent), myId(theId) {}; virtual ModelAPI_ResultField* field() const { return myParent; } diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index ccc24dfb5..55615ee13 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -256,7 +256,7 @@ void XGUI_DataModel::processEvent(const std::shared_ptr& theMess FeaturePtr aFeature = std::dynamic_pointer_cast(aObject); if (aFeature.get() && aFeature->firstResult().get() && (aFeature->firstResult()->groupName() == ModelAPI_ResultField::group())) { - ResultFieldPtr aResult = + ResultFieldPtr aResult = std::dynamic_pointer_cast(aFeature->firstResult()); QModelIndex aIndex = objectIndex(aResult); removeRows(0, aResult->stepsSize(), aIndex); @@ -333,7 +333,7 @@ ObjectPtr XGUI_DataModel::object(const QModelIndex& theIndex) const { if (theIndex.internalId() == 0) // this is a folder return ObjectPtr(); - ModelAPI_Object* aObj = + ModelAPI_Object* aObj = dynamic_cast((ModelAPI_Entity*)theIndex.internalPointer()); if (!aObj) return ObjectPtr(); @@ -451,7 +451,7 @@ QVariant XGUI_DataModel::data(const QModelIndex& theIndex, int theRole) const } } } else { - ModelAPI_Object* aObj = + ModelAPI_Object* aObj = dynamic_cast((ModelAPI_Entity*)theIndex.internalPointer()); if (aObj) { switch (theRole) { @@ -482,7 +482,7 @@ QVariant XGUI_DataModel::data(const QModelIndex& theIndex, int theRole) const switch (theRole) { case Qt::DisplayRole: { - ModelAPI_ResultField::ModelAPI_FieldStep* aStep = + ModelAPI_ResultField::ModelAPI_FieldStep* aStep = dynamic_cast ((ModelAPI_Entity*)theIndex.internalPointer()); if (aStep) { @@ -626,7 +626,7 @@ QModelIndex XGUI_DataModel::index(int theRow, int theColumn, const QModelIndex & } } } else { - ModelAPI_Object* aParentObj = + ModelAPI_Object* aParentObj = dynamic_cast((ModelAPI_Entity*)theParent.internalPointer()); // Check for Part feature @@ -691,7 +691,7 @@ QModelIndex XGUI_DataModel::parent(const QModelIndex& theIndex) const ObjectPtr aObj = object(theIndex); if (!aObj.get()) { // It can b e a step of a field - ModelAPI_ResultField::ModelAPI_FieldStep* aStep = + ModelAPI_ResultField::ModelAPI_FieldStep* aStep = dynamic_cast ((ModelAPI_Entity*)theIndex.internalPointer()); if (aStep) { -- 2.39.2