#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

@@ -56,12 +56,13 @@ RicfExportSnapshots::RicfExportSnapshots()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfExportSnapshots::execute()
RicfCommandResponse RicfExportSnapshots::execute()
{
if (!RiaGuiApplication::isRunning())
{
RiaLogging::error(QString("RicfExportSnapshot: Command cannot run without a GUI"));
return;
QString error("RicfExportSnapshot: Command cannot run without a GUI");
RiaLogging::error(error);
return RicfCommandResponse(RicfCommandResponse::COMMAND_ERROR, error);
}
RiuMainWindow* mainWnd = RiuMainWindow::instance();
@@ -85,4 +86,6 @@ void RicfExportSnapshots::execute()
mainWnd->loadWinGeoAndDockToolBarLayout();
RiaGuiApplication::instance()->processEvents();
return RicfCommandResponse();
}