Ref T528, test if simulator interface can be used (only possible in local UI, not in remote UI)

This commit is contained in:
Klaus Basan
2019-02-08 01:23:59 +01:00
committed by Mat Sutcliffe
parent 9db56d3fd4
commit ddd44edebd
2 changed files with 11 additions and 2 deletions

View File

@@ -1434,11 +1434,17 @@ namespace BlackCore
QPointer<ISimulator> CApplication::getISimulator() const
{
if (!this->getCoreFacade()) { return nullptr; }
if (!this->getCoreFacade()->getCContextSimulator()) { return nullptr; }
if (!this->hasSimulator()) { return nullptr; }
return this->getCoreFacade()->getCContextSimulator()->simulator();
}
bool CApplication::hasSimulator() const
{
if (!this->getCoreFacade()) { return false; }
if (!this->getCoreFacade()->getIContextSimulator()->isUsingImplementingObject()) { return false; }
return (this->getCoreFacade()->getCContextSimulator()); // should always be true
}
void CApplication::cmdLineHelpMessage()
{
m_parser.showHelp(); // terminates