#10367 Janitor: Remove unneccessary 'this' pointers

This commit is contained in:
Kristian Bendiksen
2023-08-04 09:04:14 +02:00
parent 2614cf3d62
commit 5bf2c2a89d
292 changed files with 1625 additions and 1664 deletions

View File

@@ -501,7 +501,7 @@ void RimBoxIntersection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrder
uiOrdering.add( &m_show3DManipulator );
this->defineSeparateDataSourceUi( uiConfigName, uiOrdering );
defineSeparateDataSourceUi( uiConfigName, uiOrdering );
}
//--------------------------------------------------------------------------------------------------
@@ -564,21 +564,21 @@ void RimBoxIntersection::updateVisibility()
if ( m_singlePlaneState == PLANE_STATE_X )
{
m_maxXCoord.uiCapability()->setUiReadOnly( true );
this->setUiIconFromResourceString( QString( ":/IntersectionXPlane16x16.png" ) );
setUiIconFromResourceString( QString( ":/IntersectionXPlane16x16.png" ) );
}
else if ( m_singlePlaneState == PLANE_STATE_Y )
{
m_maxYCoord.uiCapability()->setUiReadOnly( true );
this->setUiIconFromResourceString( QString( ":/IntersectionYPlane16x16.png" ) );
setUiIconFromResourceString( QString( ":/IntersectionYPlane16x16.png" ) );
}
else if ( m_singlePlaneState == PLANE_STATE_Z )
{
m_maxDepth.uiCapability()->setUiReadOnly( true );
this->setUiIconFromResourceString( QString( ":/IntersectionZPlane16x16.png" ) );
setUiIconFromResourceString( QString( ":/IntersectionZPlane16x16.png" ) );
}
else
{
this->setUiIconFromResourceString( QString( ":/IntersectionBox16x16.png" ) );
setUiIconFromResourceString( QString( ":/IntersectionBox16x16.png" ) );
}
}

View File

@@ -627,7 +627,7 @@ void RimExtrudedCurveIntersection::defineUiOrdering( QString uiConfigName, caf::
}
}
this->defineSeparateDataSourceUi( uiConfigName, uiOrdering );
defineSeparateDataSourceUi( uiConfigName, uiOrdering );
uiOrdering.skipRemainingFields( true );
}
@@ -1161,7 +1161,7 @@ cvf::Vec3d RimExtrudedCurveIntersection::extrusionDirection() const
if ( m_direction() == RimExtrudedCurveIntersection::CrossSectionDirEnum::CS_HORIZONTAL )
{
std::vector<std::vector<cvf::Vec3d>> lines = this->polyLines();
std::vector<std::vector<cvf::Vec3d>> lines = polyLines();
if ( !lines.empty() && lines[0].size() > 1 )
{
std::vector<cvf::Vec3d> firstLine = lines[0];

View File

@@ -146,7 +146,7 @@ caf::PdmFieldHandle* RimIntersection::objectToggleField()
void RimIntersection::defineSeparateDataSourceUi( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
QString inactiveText;
if ( !this->activeSeparateResultDefinition() )
if ( !activeSeparateResultDefinition() )
{
inactiveText = " (Inactive)";
}
@@ -199,7 +199,7 @@ cvf::ref<RivIntersectionHexGridInterface> RimIntersection::createHexGridInterfac
return new RivEclipseIntersectionGrid( eclipseCase->eclipseCaseData()->mainGrid(),
eclipseCase->eclipseCaseData()->activeCellInfo(
resDef->eclipseResultDefinition()->porosityModel() ),
this->isInactiveCellsVisible() );
isInactiveCellsVisible() );
}
// Geomech case
@@ -217,7 +217,7 @@ cvf::ref<RivIntersectionHexGridInterface> RimIntersection::createHexGridInterfac
{
RigMainGrid* grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid( grid, eclipseView->currentActiveCellInfo(), this->isInactiveCellsVisible() );
return new RivEclipseIntersectionGrid( grid, eclipseView->currentActiveCellInfo(), isInactiveCellsVisible() );
}
if ( geoView && geoView->femParts() )

View File

@@ -125,7 +125,7 @@ void RimIntersectionCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& ui
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::applySingleColorEffect()
{
if ( !this->isActive() ) return;
if ( !isActive() ) return;
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
@@ -149,7 +149,7 @@ void RimIntersectionCollection::applySingleColorEffect()
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult, int timeStepIndex )
{
if ( !this->isActive() ) return;
if ( !isActive() ) return;
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
@@ -190,7 +190,7 @@ void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult
//--------------------------------------------------------------------------------------------------
bool RimIntersectionCollection::hasAnyActiveSeparateResults()
{
if ( !this->isActive() ) return false;
if ( !isActive() ) return false;
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{

View File

@@ -235,10 +235,10 @@ void RimIntersectionResultDefinition::updateLegendRangesTextAndVisibility( const
{
assignCaseIfMissing();
if ( !this->isInAction() ) return;
if ( !isInAction() ) return;
if ( ( this->isEclipseResultDefinition() && m_eclipseResultDefinition()->hasCategoryResult() ) ||
( !this->isEclipseResultDefinition() && m_geomResultDefinition()->hasCategoryResult() ) )
if ( ( isEclipseResultDefinition() && m_eclipseResultDefinition()->hasCategoryResult() ) ||
( !isEclipseResultDefinition() && m_geomResultDefinition()->hasCategoryResult() ) )
{
regularLegendConfig()->setMappingMode( RimRegularLegendConfig::MappingType::CATEGORY_INTEGER );
regularLegendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
@@ -257,31 +257,31 @@ void RimIntersectionResultDefinition::updateLegendRangesTextAndVisibility( const
}
}
if ( this->isEclipseResultDefinition() )
if ( isEclipseResultDefinition() )
{
RimEclipseResultDefinition* eclResultDef = this->eclipseResultDefinition();
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(), this->ternaryLegendConfig(), this->timeStep() );
RimEclipseResultDefinition* eclResultDef = eclipseResultDefinition();
eclResultDef->updateRangesForExplicitLegends( regularLegendConfig(), ternaryLegendConfig(), timeStep() );
eclResultDef->updateLegendTitle( this->regularLegendConfig(), title );
eclResultDef->updateLegendTitle( regularLegendConfig(), title );
if ( this->regularLegendConfig()->showLegend() && eclResultDef->hasResult() )
if ( regularLegendConfig()->showLegend() && eclResultDef->hasResult() )
{
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->regularLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( regularLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
}
else if ( eclResultDef->isTernarySaturationSelected() && eclResultDef->currentGridCellResults()->maxTimeStepCount() > 1 &&
this->ternaryLegendConfig()->showLegend() && this->ternaryLegendConfig()->titledOverlayFrame() )
ternaryLegendConfig()->showLegend() && ternaryLegendConfig()->titledOverlayFrame() )
{
this->ternaryLegendConfig()->setTitle( title );
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->ternaryLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
ternaryLegendConfig()->setTitle( title );
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( ternaryLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
}
}
else
{
this->geoMechResultDefinition()->updateLegendTextAndRanges( this->regularLegendConfig(), title, this->timeStep() );
geoMechResultDefinition()->updateLegendTextAndRanges( regularLegendConfig(), title, timeStep() );
if ( this->geoMechResultDefinition()->hasResult() && this->regularLegendConfig()->showLegend() )
if ( geoMechResultDefinition()->hasResult() && regularLegendConfig()->showLegend() )
{
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->regularLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( regularLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
}
}
}
@@ -321,7 +321,7 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
reDraw = true;
}
this->updateConnectedEditors();
updateConnectedEditors();
auto interResDefColl = firstAncestorOrThisOfType<RimIntersectionResultsDefinitionCollection>();
bool isInAction = isActive() && interResDefColl && interResDefColl->isActive();
@@ -345,7 +345,7 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
update2dIntersectionViews();
}
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
}
//--------------------------------------------------------------------------------------------------
@@ -374,8 +374,8 @@ void RimIntersectionResultDefinition::setDefaultEclipseLegendConfig()
bool useDiscreteLogLevels = false;
bool isCategoryResult = m_eclipseResultDefinition->hasCategoryResult();
auto eclResultDef = this->eclipseResultDefinition();
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(), this->ternaryLegendConfig(), this->timeStep() );
auto eclResultDef = eclipseResultDefinition();
eclResultDef->updateRangesForExplicitLegends( regularLegendConfig(), ternaryLegendConfig(), timeStep() );
m_legendConfig->setDefaultConfigForResultName( m_case->caseId(),
m_eclipseResultDefinition->resultVariable(),
@@ -456,7 +456,7 @@ void RimIntersectionResultDefinition::initAfterRead()
{
updateCaseInResultDefinitions();
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -93,7 +93,7 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
const QVariant& oldValue,
const QVariant& newValue )
{
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
auto gridView = firstAncestorOrThisOfType<RimGridView>();
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
@@ -105,7 +105,7 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
//--------------------------------------------------------------------------------------------------
void RimIntersectionResultsDefinitionCollection::initAfterRead()
{
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
}
//--------------------------------------------------------------------------------------------------