#4285 Octave : Move creation of command line arguments to RimCalcScript

This commit is contained in:
Magne Sjaastad
2019-04-04 21:37:22 +02:00
parent fd774bec39
commit 7af16ce24c
5 changed files with 33 additions and 24 deletions

View File

@@ -59,15 +59,7 @@ void RicExecuteScriptFeature::onActionTriggered(bool isChecked)
QString octavePath = app->octavePath();
if (!octavePath.isEmpty())
{
// TODO: Must rename RimCalcScript::absolutePath to absoluteFileName, as the code below is confusing
// absolutePath() is a function in QFileInfo
QFileInfo fi(calcScript->absoluteFileName());
QString octaveFunctionSearchPath = fi.absolutePath();
QStringList arguments = app->octaveArguments();
arguments.append("--path");
arguments << octaveFunctionSearchPath;
arguments << calcScript->absoluteFileName();
QStringList arguments = RimCalcScript::createCommandLineArguments(calcScript->absoluteFileName());
RiaApplication::instance()->launchProcess(octavePath, arguments);
}