mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 00:50:15 -05:00
#2365 Replace PdmField<QString> with PdmField<caf::FilePath> for file path fields
Convert 11 file/directory path fields from QString to caf::FilePath across ProjectDataModel classes for type safety and consistent path handling. Fields converted: RimCalcScript::absoluteFileName, RimScriptCollection::directory, RimBinaryExportSettings::fileName, RimExportInputSettings::fileName, RimFractureExportSettings::fileName, RimReservoirCellResultsStorage::m_resultCacheFileName, RimProcess::m_workDir, RimWellIASettings::m_baseDir, RimPlotTemplateFileItem::m_absoluteFileName, RimWellMeasurement::m_filePath, RimFileWellPath::m_filePath.
This commit is contained in:
1 parent
394bc6c3df
commit
cbbcbb650c
28 files changed
+87
-77
No files matched your search
@@ -94,7 +94,7 @@ void RicExecuteScriptFeature::executeScript( RimCalcScript* calcScript )
|
||||
QString octavePath = app->octavePath();
|
||||
if ( !octavePath.isEmpty() )
|
||||
{
|
||||
QStringList arguments = RimCalcScript::createCommandLineArguments( calcScript->absoluteFileName() );
|
||||
QStringList arguments = RimCalcScript::createCommandLineArguments( calcScript->absoluteFileName().path() );
|
||||
RiaApplication::instance()->launchProcess( octavePath, arguments, app->octaveProcessEnvironment() );
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ void RicExecuteScriptFeature::executeScript( RimCalcScript* calcScript )
|
||||
QString pythonPath = app->pythonPath();
|
||||
if ( !pythonPath.isEmpty() )
|
||||
{
|
||||
QStringList arguments = RimCalcScript::createCommandLineArguments( calcScript->absoluteFileName() );
|
||||
QStringList arguments = RimCalcScript::createCommandLineArguments( calcScript->absoluteFileName().path() );
|
||||
QProcessEnvironment penv = app->pythonProcessEnvironment();
|
||||
|
||||
RiuProcessMonitor* processMonitor = RiuMainWindow::instance()->processMonitor();
|
||||
@@ -136,10 +136,10 @@ void RicExecuteScriptFeature::executeScript( RimCalcScript* calcScript )
|
||||
}
|
||||
}
|
||||
|
||||
if ( !calcScript->absoluteFileName().isEmpty() )
|
||||
if ( !calcScript->absoluteFileName().path().isEmpty() )
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue( RicExecuteLastUsedScriptFeature::lastUsedScriptPathKey(), calcScript->absoluteFileName() );
|
||||
settings.setValue( RicExecuteLastUsedScriptFeature::lastUsedScriptPathKey(), calcScript->absoluteFileName().path() );
|
||||
|
||||
auto cmdFeature = caf::CmdFeatureManager::instance()->getCommandFeature( "RicExecuteLastUsedScriptFeature" );
|
||||
cmdFeature->action(); // Retrieve the action to update the looks
|
||||
|
||||
Reference in new issue
Block a user