#4429 Implement return status handling for command file interface

This commit is contained in:
Gaute Lindkvist
2019-05-23 13:59:19 +02:00
parent e29c7acc03
commit 650af20e06
61 changed files with 639 additions and 276 deletions

View File

@@ -40,7 +40,7 @@ RicfOpenProject::RicfOpenProject()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfOpenProject::execute()
RicfCommandResponse RicfOpenProject::execute()
{
QString projectPath = m_path;
QFileInfo projectPathInfo(projectPath);
@@ -52,8 +52,9 @@ void RicfOpenProject::execute()
bool ok = RiaApplication::instance()->loadProject(projectPath);
if (!ok)
{
RiaLogging::error(QString("openProject: Unable to open project at %1").arg(m_path()));
return;
QString errMsg = QString("openProject: Unable to open project at %1").arg(m_path());
RiaLogging::error(errMsg);
return RicfCommandResponse(RicfCommandResponse::COMMAND_ERROR, errMsg);
}
if (RiaRegressionTestRunner::instance()->isRunningRegressionTests())
@@ -62,4 +63,6 @@ void RicfOpenProject::execute()
}
RicfCommandFileExecutor::instance()->setLastProjectPath(projectPath);
return RicfCommandResponse();
}