#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

@@ -165,7 +165,7 @@ bool RimFileSurface::loadDataFromFile()
{
std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> surface;
QString filePath = this->surfaceFilePath();
QString filePath = surfaceFilePath();
if ( filePath.endsWith( "ptl", Qt::CaseInsensitive ) )
{
surface = RifSurfaceImporter::readPetrelFile( filePath );

View File

@@ -202,11 +202,11 @@ void RimSurface::fieldChangedByUi( const caf::PdmFieldHandle* changedField, cons
}
else if ( changedField == &m_userDescription )
{
this->updateConnectedEditors();
updateConnectedEditors();
}
else if ( changedField == &m_depthOffset )
{
this->onLoadData();
onLoadData();
updateViews = true;
}

View File

@@ -158,7 +158,7 @@ RimSurface* RimSurfaceCollection::importSurfacesFromFiles( const QStringList& fi
}
else
{
this->addSurface( newSurface );
addSurface( newSurface );
surfacesToLoad.push_back( newSurface );
++newSurfCount;
}
@@ -169,7 +169,7 @@ RimSurface* RimSurfaceCollection::importSurfacesFromFiles( const QStringList& fi
RiaLogging::warning( "Import Surfaces : Could not import the following files:\n" + errorMessages );
}
this->updateConnectedEditors();
updateConnectedEditors();
updateViews( surfacesToLoad, showLegend );
@@ -194,7 +194,7 @@ void RimSurfaceCollection::reloadSurfaces( std::vector<RimSurface*> surfaces, bo
surface->reloadData();
}
this->updateConnectedEditors();
updateConnectedEditors();
updateViews( surfaces, showLegend );
}
@@ -227,7 +227,7 @@ RimSurface* RimSurfaceCollection::copySurfaces( std::vector<RimSurface*> surface
retsurf = surface;
}
this->updateConnectedEditors();
updateConnectedEditors();
return retsurf;
}
@@ -251,7 +251,7 @@ RimSurface* RimSurfaceCollection::addGridCaseSurface( RimCase* sourceCase, int o
m_surfaces.push_back( s );
this->updateConnectedEditors();
updateConnectedEditors();
std::vector<RimSurface*> surfacesToRefresh;
surfacesToRefresh.push_back( s );
@@ -477,7 +477,7 @@ RimSurface* RimSurfaceCollection::addSurfacesAtIndex( int position, std::vector<
void RimSurfaceCollection::addSubCollection( RimSurfaceCollection* subcoll )
{
m_subCollections.push_back( subcoll );
this->updateConnectedEditors();
updateConnectedEditors();
updateViews();

View File

@@ -184,9 +184,9 @@ void RimSurfaceInView::updateLegendRangesTextAndVisibility( RiuViewer* nativeOrO
{
RimRegularLegendConfig* legendConfig = m_resultDefinition->legendConfig();
legendConfig->setTitle( QString( "Surface : \n%1\n%2" ).arg( this->name() ).arg( m_resultDefinition->propertyName() ) );
legendConfig->setTitle( QString( "Surface : \n%1\n%2" ).arg( name() ).arg( m_resultDefinition->propertyName() ) );
if ( this->isActive() && m_resultDefinition->isChecked() && legendConfig->showLegend() )
if ( isActive() && m_resultDefinition->isChecked() && legendConfig->showLegend() )
{
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( legendConfig->titledOverlayFrame(), isUsingOverrideViewer );
}
@@ -198,7 +198,7 @@ void RimSurfaceInView::updateLegendRangesTextAndVisibility( RiuViewer* nativeOrO
//--------------------------------------------------------------------------------------------------
void RimSurfaceInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
bool scheduleRedraw = false;
@@ -234,7 +234,7 @@ void RimSurfaceInView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
uiOrdering.add( &m_name );
uiOrdering.add( &m_showInactiveCells );
this->defineSeparateDataSourceUi( uiConfigName, uiOrdering );
defineSeparateDataSourceUi( uiConfigName, uiOrdering );
}
//--------------------------------------------------------------------------------------------------
@@ -259,5 +259,5 @@ caf::PdmFieldHandle* RimSurfaceInView::userDescriptionField()
//--------------------------------------------------------------------------------------------------
void RimSurfaceInView::initAfterRead()
{
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
}

View File

@@ -154,7 +154,7 @@ void RimSurfaceInViewCollection::syncCollectionsWithView()
{
// check if this is a collection we need to create
RimSurfaceInViewCollection* viewSurfColl = this->getCollectionInViewForCollection( surfcoll );
RimSurfaceInViewCollection* viewSurfColl = getCollectionInViewForCollection( surfcoll );
if ( viewSurfColl == nullptr )
{
RimSurfaceInViewCollection* newColl = new RimSurfaceInViewCollection();
@@ -205,7 +205,7 @@ void RimSurfaceInViewCollection::syncSurfacesWithView()
for ( auto surf : surfs )
{
// check if this is a surface we need to create
RimSurfaceInView* viewSurf = this->getSurfaceInViewForSurface( surf );
RimSurfaceInView* viewSurf = getSurfaceInViewForSurface( surf );
if ( viewSurf == nullptr )
{
RimSurfaceInView* newSurfInView = new RimSurfaceInView();
@@ -307,7 +307,7 @@ void RimSurfaceInViewCollection::appendPartsToModel( cvf::ModelBasicList* model,
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
if ( changedField == &m_isChecked )
{
@@ -321,7 +321,7 @@ void RimSurfaceInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::initAfterRead()
{
this->updateUiIconFromToggleField();
updateUiIconFromToggleField();
}
//--------------------------------------------------------------------------------------------------
@@ -361,7 +361,7 @@ RimSurfaceInViewCollection* RimSurfaceInViewCollection::getCollectionInViewForCo
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::updateCellResultColor( bool hasGeneralCellResult, int timeStepIndex )
{
if ( !this->isChecked() ) return;
if ( !isChecked() ) return;
for ( RimSurfaceInViewCollection* coll : m_collectionsInView )
{
@@ -407,7 +407,7 @@ void RimSurfaceInViewCollection::updateCellResultColor( bool hasGeneralCellResul
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::applySingleColorEffect()
{
if ( !this->isChecked() ) return;
if ( !isChecked() ) return;
for ( RimSurfaceInViewCollection* coll : m_collectionsInView )
{
@@ -431,7 +431,7 @@ void RimSurfaceInViewCollection::applySingleColorEffect()
//--------------------------------------------------------------------------------------------------
bool RimSurfaceInViewCollection::hasAnyActiveSeparateResults()
{
if ( !this->isChecked() ) return false;
if ( !isChecked() ) return false;
for ( RimSurfaceInViewCollection* coll : m_collectionsInView )
{