clang-format: Set column width to 140

* Set column width to 140
* Use c++20
* Remove redundant virtual
This commit is contained in:
Magne Sjaastad
2023-02-26 10:48:40 +01:00
committed by GitHub
parent 8768e186d8
commit f8c5cf389f
1535 changed files with 10456 additions and 19398 deletions

View File

@@ -37,9 +37,8 @@ class PdmScriptIOMessages;
class RicfCommandFileReader
{
public:
static std::vector<RicfCommandObject*> readCommands( QTextStream& inputStream,
caf::PdmObjectFactory* objectFactory,
caf::PdmScriptIOMessages* errorMessageContainer );
static std::vector<RicfCommandObject*>
readCommands( QTextStream& inputStream, caf::PdmObjectFactory* objectFactory, caf::PdmScriptIOMessages* errorMessageContainer );
static void writeCommands( QTextStream& outputStream, const std::vector<RicfCommandObject*>& commandsToWrite );
};

View File

@@ -34,8 +34,7 @@
//--------------------------------------------------------------------------------------------------
/// Empty wellPathNames returns all well paths
//--------------------------------------------------------------------------------------------------
std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStringList& wellPathNames,
QStringList* wellsNotFound )
std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStringList& wellPathNames, QStringList* wellsNotFound )
{
std::vector<RimWellPath*> wellPaths;
auto allWellPaths = RimProject::current()->allWellPaths();

View File

@@ -59,8 +59,7 @@ public:
static RicfCommandFileExecutor* instance();
static std::vector<RicfCommandObject*>
prepareFileCommandsForExecution( const std::vector<RicfCommandObject*>& commandsReadFromFile );
static std::vector<RicfCommandObject*> prepareFileCommandsForExecution( const std::vector<RicfCommandObject*>& commandsReadFromFile );
private:
void clearCachedData();

View File

@@ -94,8 +94,7 @@ caf::PdmScriptResponse RicfComputeCaseGroupStatistics::execute()
if ( !foundCase )
{
QString warning =
QString( "computeCaseGroupStatistics: Could not find statistics case with ID %1." ).arg( caseId );
QString warning = QString( "computeCaseGroupStatistics: Could not find statistics case with ID %1." ).arg( caseId );
RiaLogging::warning( warning );
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );

View File

@@ -34,8 +34,7 @@ CAF_PDM_SOURCE_INIT( RicfCreateGridCaseGroupResult, "createGridCaseGroupResult"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicfCreateGridCaseGroupResult::RicfCreateGridCaseGroupResult( int caseGroupId /*= -1*/,
const QString& caseGroupName /*= ""*/ )
RicfCreateGridCaseGroupResult::RicfCreateGridCaseGroupResult( int caseGroupId /*= -1*/, const QString& caseGroupName /*= ""*/ )
{
CAF_PDM_InitObject( "case_group_result" );
CAF_PDM_InitField( &this->caseGroupId, "groupId", caseGroupId, "" );

View File

@@ -72,8 +72,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
if ( !wellsNotFound.empty() )
{
QString error = QString( "createLgrForCompletions: These well paths were not found: " ) +
wellsNotFound.join( ", " );
QString error = QString( "createLgrForCompletions: These well paths were not found: " ) + wellsNotFound.join( ", " );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
@@ -87,8 +86,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
}
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
auto feature = dynamic_cast<RicCreateTemporaryLgrFeature*>(
commandManager->getCommandFeature( "RicCreateTemporaryLgrFeature" ) );
auto feature = dynamic_cast<RicCreateTemporaryLgrFeature*>( commandManager->getCommandFeature( "RicCreateTemporaryLgrFeature" ) );
RimEclipseCase* eclipseCase = nullptr;
{

View File

@@ -93,8 +93,7 @@ caf::PdmScriptResponse RicfCreateMultipleFractures::execute()
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
if ( !wellsNotFound.empty() )
{
QString error =
QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
QString error = QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
@@ -109,8 +108,7 @@ caf::PdmScriptResponse RicfCreateMultipleFractures::execute()
if ( !fractureTemplate )
{
QString error =
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
QString error = QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
@@ -131,8 +129,8 @@ caf::PdmScriptResponse RicfCreateMultipleFractures::execute()
RicCreateMultipleFracturesOptionItemUi* options = new RicCreateMultipleFracturesOptionItemUi();
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
auto feature = dynamic_cast<RicCreateMultipleFracturesFeature*>(
commandManager->getCommandFeature( "RicCreateMultipleFracturesFeature" ) );
auto feature =
dynamic_cast<RicCreateMultipleFracturesFeature*>( commandManager->getCommandFeature( "RicCreateMultipleFracturesFeature" ) );
// Default layers
int topLayer = m_topLayer;

View File

@@ -91,8 +91,8 @@ caf::PdmScriptResponse RicfCreateWellBoreStabilityPlotFeature::execute()
{
if ( !chosenWellPath->wellPathGeometry() )
{
QString error = QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" )
.arg( chosenWellPath->name() );
QString error =
QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" ).arg( chosenWellPath->name() );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}

View File

@@ -71,8 +71,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
if ( !wellsNotFound.empty() )
{
QString error( QString( "exportLgrForCompletions: These well paths were not found: " ) +
wellsNotFound.join( ", " ) );
QString error( QString( "exportLgrForCompletions: These well paths were not found: " ) + wellsNotFound.join( ", " ) );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
@@ -92,7 +91,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
}
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
auto feature = dynamic_cast<RicExportLgrFeature*>( commandManager->getCommandFeature( "RicExportLgrFeature" ) );
auto feature = dynamic_cast<RicExportLgrFeature*>( commandManager->getCommandFeature( "RicExportLgrFeature" ) );
RimEclipseCase* eclipseCase = TOOLS::caseFromId( m_caseId() );
if ( !eclipseCase )
@@ -119,10 +118,8 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
caf::PdmScriptResponse response;
if ( !wellsIntersectingOtherLgrs.empty() )
{
auto wellsList = wellsIntersectingOtherLgrs.join( ", " );
QString warning(
"exportLgrForCompletions: No export for some wells due to existing intersecting LGR(s).Affected wells : " +
wellsList );
auto wellsList = wellsIntersectingOtherLgrs.join( ", " );
QString warning( "exportLgrForCompletions: No export for some wells due to existing intersecting LGR(s).Affected wells : " + wellsList );
RiaLogging::warning( warning );
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
}

View File

@@ -70,8 +70,7 @@ caf::PdmScriptResponse RicfExportMsw::execute()
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
QString exportFolder =
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
if ( exportFolder.isNull() )
{
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" );

View File

@@ -67,8 +67,7 @@ caf::PdmScriptResponse RicfExportMultiCaseSnapshots::execute()
std::vector<QString> listFileNames = RiaApplication::readFileListFromTextFile( m_gridListFile() );
app->runMultiCaseSnapshots( lastProjectPath,
listFileNames,
RicfCommandFileExecutor::instance()->getExportPath(
RicfCommandFileExecutor::ExportType::SNAPSHOTS ) );
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS ) );
return caf::PdmScriptResponse();
}

View File

@@ -97,8 +97,7 @@ caf::PdmScriptResponse RicfExportProperty::execute()
QString filePath = m_exportFileName;
if ( filePath.isNull() )
{
QDir propertiesDir(
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
QDir propertiesDir( RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
QString fileName = QString( "%1-%2" ).arg( eclipseCase->caseUserDescription() ).arg( m_propertyName );
fileName = caf::Utils::makeValidFileBasename( fileName );
filePath = propertiesDir.filePath( fileName );

View File

@@ -128,24 +128,19 @@ caf::PdmScriptResponse RicfExportPropertyInViews::execute()
if ( resultAccessor.isNull() )
{
QString warning =
QString( "exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
.arg( m_caseId )
.arg( view->currentTimeStep() )
.arg( propertyName );
QString warning = QString( "exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
.arg( m_caseId )
.arg( view->currentTimeStep() )
.arg( propertyName );
RiaLogging::warning( warning );
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
continue;
}
QDir propertiesDir(
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
QDir propertiesDir( RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
QString fileName = QString( "%1-%2-T%3-%4" )
.arg( eclipseCase->caseUserDescription() )
.arg( view->name() )
.arg( view->currentTimeStep() )
.arg( propertyName );
QString fileName =
QString( "%1-%2-T%3-%4" ).arg( eclipseCase->caseUserDescription() ).arg( view->name() ).arg( view->currentTimeStep() ).arg( propertyName );
fileName = caf::Utils::makeValidFileBasename( fileName );
const QString filePath = propertiesDir.filePath( fileName );

View File

@@ -52,10 +52,7 @@ RicfExportSimWellFractureCompletions::RicfExportSimWellFractureCompletions()
CAF_PDM_InitScriptableField( &m_timeStep, "timeStep", -1, "Time Step Index" );
CAF_PDM_InitScriptableField( &m_simWellNames, "simulationWellNames", std::vector<QString>(), "Simulation Well Names" );
CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" );
CAF_PDM_InitScriptableField( &m_compdatExport,
"compdatExport",
RicExportCompletionDataSettingsUi::CompdatExportType(),
"Compdat Export" );
CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" );
}
//--------------------------------------------------------------------------------------------------
@@ -83,8 +80,7 @@ caf::PdmScriptResponse RicfExportSimWellFractureCompletions::execute()
exportSettings.caseToApply = eclipseCase;
}
QString exportFolder =
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
if ( exportFolder.isNull() )
{
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" );

View File

@@ -87,13 +87,11 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
CVF_ASSERT( mainWnd );
QByteArray curState = mainWnd->dockManager()->saveState( 0 );
mainWnd->dockManager()->restoreState(
RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
RiaGuiApplication::instance()->processEvents();
QString absolutePathToSnapshotDir =
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
if ( !m_exportFolder().isEmpty() )
{
@@ -101,8 +99,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
}
if ( absolutePathToSnapshotDir.isNull() )
{
absolutePathToSnapshotDir =
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
absolutePathToSnapshotDir = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
}
if ( m_type == RicfExportSnapshots::SnapshotsType::VIEWS || m_type == RicfExportSnapshots::SnapshotsType::ALL )
{
@@ -113,10 +110,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
QApplication::processEvents();
}
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir,
m_prefix,
m_caseId(),
m_viewId() );
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir, m_prefix, m_caseId(), m_viewId() );
}
if ( m_type == RicfExportSnapshots::SnapshotsType::PLOTS || m_type == RicfExportSnapshots::SnapshotsType::ALL )
{
@@ -134,11 +128,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
QString fileSuffix = ".png";
if ( m_plotOutputFormat == PlotOutputFormat::PDF ) fileSuffix = ".pdf";
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir,
activateWidget,
m_prefix,
m_viewId(),
fileSuffix );
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir, activateWidget, m_prefix, m_viewId(), fileSuffix );
}
RiaGuiApplication::instance()->processEvents();

View File

@@ -66,10 +66,7 @@ RicfExportVisibleCells::RicfExportVisibleCells()
CAF_PDM_InitScriptableField( &m_caseId, "caseId", -1, "Case ID" );
CAF_PDM_InitScriptableField( &m_viewId, "viewId", -1, "View ID" );
CAF_PDM_InitScriptableField( &m_viewName, "viewName", QString(), "View Name" );
CAF_PDM_InitScriptableField( &m_exportKeyword,
"exportKeyword",
caf::AppEnum<RicfExportVisibleCells::ExportKeyword>(),
"Export Keyword" );
CAF_PDM_InitScriptableField( &m_exportKeyword, "exportKeyword", caf::AppEnum<RicfExportVisibleCells::ExportKeyword>(), "Export Keyword" );
CAF_PDM_InitScriptableField( &m_visibleActiveCellsValue, "visibleActiveCellsValue", 1, "Visible Active Cells Value" );
CAF_PDM_InitScriptableField( &m_hiddenActiveCellsValue, "hiddenActiveCellsValue", 0, "Hidden Active Cells Value" );
CAF_PDM_InitScriptableField( &m_inactiveCellsValue, "inactiveCellsValue", 0, "Inactive Cells Value" );
@@ -97,10 +94,8 @@ caf::PdmScriptResponse RicfExportVisibleCells::execute()
}
if ( !eclipseView )
{
QString error( QString( "exportVisibleCells: Could not find view of id %1 or named '%2' in case ID %3" )
.arg( m_viewId )
.arg( m_viewName )
.arg( m_caseId ) );
QString error(
QString( "exportVisibleCells: Could not find view of id %1 or named '%2' in case ID %3" ).arg( m_viewId ).arg( m_viewName ).arg( m_caseId ) );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
@@ -123,8 +118,7 @@ caf::PdmScriptResponse RicfExportVisibleCells::execute()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfExportVisibleCells::buildExportSettings( const QString& exportFolder,
RicSaveEclipseInputVisibleCellsUi* exportSettings )
void RicfExportVisibleCells::buildExportSettings( const QString& exportFolder, RicSaveEclipseInputVisibleCellsUi* exportSettings )
{
QDir baseDir( exportFolder );
exportSettings->exportFilename = baseDir.absoluteFilePath( QString( "%1.grdecl" ).arg( m_exportKeyword().text() ) );

View File

@@ -92,10 +92,7 @@ caf::PdmScriptResponse RicfExportWellLogPlotData::execute()
if ( m_format() == ExportFormat::ASCII )
{
QString validFileName =
RicAsciiExportWellLogPlotFeature::makeValidExportFileName( plot,
m_folder(),
m_filePrefix(),
m_capitalizeFileNames() );
RicAsciiExportWellLogPlotFeature::makeValidExportFileName( plot, m_folder(), m_filePrefix(), m_capitalizeFileNames() );
if ( RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( validFileName, plot ) )
{
result->exportedFiles.v().push_back( validFileName );
@@ -103,24 +100,21 @@ caf::PdmScriptResponse RicfExportWellLogPlotData::execute()
}
else
{
std::vector<QString> exportedFiles =
RicExportToLasFileFeature::exportToLasFiles( m_folder(),
m_filePrefix(),
plot,
m_exportTvdRkb(),
m_capitalizeFileNames(),
true,
m_resampleInterval(),
m_convertCurveUnits() );
std::vector<QString> exportedFiles = RicExportToLasFileFeature::exportToLasFiles( m_folder(),
m_filePrefix(),
plot,
m_exportTvdRkb(),
m_capitalizeFileNames(),
true,
m_resampleInterval(),
m_convertCurveUnits() );
if ( exportedFiles.empty() )
{
errorMessages << QString( "No files exported for '%1'" ).arg( plot->description() );
}
else
{
result->exportedFiles.v().insert( result->exportedFiles.v().end(),
exportedFiles.begin(),
exportedFiles.end() );
result->exportedFiles.v().insert( result->exportedFiles.v().end(), exportedFiles.begin(), exportedFiles.end() );
}
}
}

View File

@@ -50,10 +50,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
CAF_PDM_InitScriptableField( &m_wellPathNames, "wellPathNames", std::vector<QString>(), "Well Path Names" );
CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" );
CAF_PDM_InitScriptableField( &m_compdatExport,
"compdatExport",
RicExportCompletionDataSettingsUi::CompdatExportType(),
"Compdat Export" );
CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" );
CAF_PDM_InitScriptableField( &m_combinationMode,
"combinationMode",
RicExportCompletionDataSettingsUi::CombinationModeType(),
@@ -65,16 +62,10 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
CAF_PDM_InitScriptableField( &m_includeFishbones, "includeFishbones", true, "Include Fishbones" );
CAF_PDM_InitScriptableField( &m_includeFractures, "includeFractures", true, "Include Fractures" );
CAF_PDM_InitScriptableField( &m_excludeMainBoreForFishbones,
"excludeMainBoreForFishbones",
false,
"Exclude Main Bore for Fishbones" );
CAF_PDM_InitScriptableField( &m_excludeMainBoreForFishbones, "excludeMainBoreForFishbones", false, "Exclude Main Bore for Fishbones" );
CAF_PDM_InitScriptableField( &m_performTransScaling, "performTransScaling", false, "Perform Transmissibility Scaling" );
CAF_PDM_InitScriptableField( &m_transScalingTimeStep,
"transScalingTimeStep",
0,
"Transmissibility Scaling Pressure Time Step" );
CAF_PDM_InitScriptableField( &m_transScalingTimeStep, "transScalingTimeStep", 0, "Transmissibility Scaling Pressure Time Step" );
CAF_PDM_InitScriptableField( &m_transScalingInitialWBHP,
"transScalingWBHPFromSummary",
RicExportCompletionDataSettingsUi::TransScalingWBHPSource(),
@@ -127,8 +118,7 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute()
QString exportFolderPath;
if ( m_customFileNameIncludingPath().isEmpty() )
{
exportFolderPath =
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
exportFolderPath = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
if ( exportFolderPath.isNull() )
{
exportFolderPath = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" );
@@ -178,16 +168,14 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute()
{
for ( const QString& wellPathName : m_wellPathNames() )
{
RimWellPath* wellPath =
RimProject::current()->activeOilField()->wellPathCollection->wellPathByName( wellPathName );
RimWellPath* wellPath = RimProject::current()->activeOilField()->wellPathCollection->wellPathByName( wellPathName );
if ( wellPath )
{
wellPaths.push_back( wellPath );
}
else
{
QString warning =
QString( "exportWellPathCompletions: Could not find well path with name %1" ).arg( wellPathName );
QString warning = QString( "exportWellPathCompletions: Could not find well path with name %1" ).arg( wellPathName );
RiaLogging::warning( warning );
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
}

View File

@@ -64,8 +64,7 @@ caf::PdmScriptResponse RicfExportWellPaths::execute()
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
if ( !wellsNotFound.empty() )
{
QString error( QString( "exportWellPaths: These well paths were not found: " ) +
wellsNotFound.join( ", " ) );
QString error( QString( "exportWellPaths: These well paths were not found: " ) + wellsNotFound.join( ", " ) );
RiaLogging::error( error );
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
@@ -78,16 +77,15 @@ caf::PdmScriptResponse RicfExportWellPaths::execute()
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
QString exportFolder =
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::WELLPATHS );
QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::WELLPATHS );
if ( exportFolder.isNull() )
{
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "wellpaths" );
}
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
auto feature = dynamic_cast<RicExportSelectedWellPathsFeature*>(
commandManager->getCommandFeature( "RicExportSelectedWellPathsFeature" ) );
auto feature =
dynamic_cast<RicExportSelectedWellPathsFeature*>( commandManager->getCommandFeature( "RicExportSelectedWellPathsFeature" ) );
for ( const auto wellPath : wellPaths )
{

View File

@@ -68,12 +68,10 @@ caf::PdmScriptResponse RicfLoadCase::execute()
std::shared_ptr<RifReaderSettings> readerSettings;
if ( m_gridOnly ) readerSettings = RifReaderSettings::createGridOnlyReaderSettings();
bool createPlot = false;
bool createView = false;
auto fileOpenMetaData = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ absolutePath },
createPlot,
createView,
readerSettings );
bool createPlot = false;
bool createView = false;
auto fileOpenMetaData =
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ absolutePath }, createPlot, createView, readerSettings );
if ( fileOpenMetaData.createdCaseIds.empty() )
{

View File

@@ -95,9 +95,7 @@ caf::PdmScriptResponse RicfSingleCaseReplace::execute()
projectModifier->setReplaceCase( m_caseId(), filePath );
}
if ( !RiaApplication::instance()->loadProject( projectPath,
RiaApplication::ProjectLoadAction::PLA_NONE,
projectModifier.p() ) )
if ( !RiaApplication::instance()->loadProject( projectPath, RiaApplication::ProjectLoadAction::PLA_NONE, projectModifier.p() ) )
{
QString errMsg( "Could not reload project" );
RiaLogging::error( errMsg );
@@ -167,9 +165,7 @@ caf::PdmScriptResponse RicfMultiCaseReplace::execute()
}
}
if ( !RiaApplication::instance()->loadProject( lastProjectPath,
RiaApplication::ProjectLoadAction::PLA_NONE,
projectModifier.p() ) )
if ( !RiaApplication::instance()->loadProject( lastProjectPath, RiaApplication::ProjectLoadAction::PLA_NONE, projectModifier.p() ) )
{
QString errMsg( "Could not reload project" );
RiaLogging::error( errMsg );

View File

@@ -67,9 +67,7 @@ caf::PdmScriptResponse RicfRunOctaveScript::execute()
bool ok;
if ( caseIds.empty() )
{
ok = RiaApplication::instance()->launchProcess( octavePath,
processArguments,
RiaApplication::instance()->octaveProcessEnvironment() );
ok = RiaApplication::instance()->launchProcess( octavePath, processArguments, RiaApplication::instance()->octaveProcessEnvironment() );
}
else
{