diff --git a/src/blackcore/context/contextapplication.h b/src/blackcore/context/contextapplication.h index c00def340..175a4d065 100644 --- a/src/blackcore/context/contextapplication.h +++ b/src/blackcore/context/contextapplication.h @@ -194,6 +194,10 @@ namespace BlackCore //! Remote enabled version of file exists virtual bool existsFile(const QString &fileName) const = 0; + + //! The HTML help for dot commands + virtual QString dotCommandsHtmlHelp() const = 0; + protected: //! Constructor IContextApplication(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime); diff --git a/src/blackcore/context/contextapplicationempty.h b/src/blackcore/context/contextapplicationempty.h index 6e1d09c40..929994ce1 100644 --- a/src/blackcore/context/contextapplicationempty.h +++ b/src/blackcore/context/contextapplicationempty.h @@ -190,6 +190,13 @@ namespace BlackCore logEmptyContextWarning(Q_FUNC_INFO); return false; } + + //! \copydoc IContextApplication::dotCommandsHtmlHelp + virtual QString dotCommandsHtmlHelp() const override + { + logEmptyContextWarning(Q_FUNC_INFO); + return QString(); + } }; } // namespace } // namespace diff --git a/src/blackcore/context/contextapplicationimpl.cpp b/src/blackcore/context/contextapplicationimpl.cpp index 091c4535e..547f2102d 100644 --- a/src/blackcore/context/contextapplicationimpl.cpp +++ b/src/blackcore/context/contextapplicationimpl.cpp @@ -14,6 +14,7 @@ #include "blackmisc/loghandler.h" #include "blackmisc/logmessage.h" #include "blackmisc/settingscache.h" +#include "blackmisc/simplecommandparser.h" #include #include @@ -201,5 +202,10 @@ namespace BlackCore if (fileName.isEmpty()) return false; return QFile::exists(fileName); } + + QString CContextApplication::dotCommandsHtmlHelp() const + { + return CSimpleCommandParser::commandsHtmlHelp(); + } } // ns } // ns diff --git a/src/blackcore/context/contextapplicationimpl.h b/src/blackcore/context/contextapplicationimpl.h index f045d4bf1..3f0ee31e9 100644 --- a/src/blackcore/context/contextapplicationimpl.h +++ b/src/blackcore/context/contextapplicationimpl.h @@ -67,6 +67,7 @@ namespace BlackCore virtual QString readFromFile(const QString &fileName) const override; virtual bool removeFile(const QString &fileName) override; virtual bool existsFile(const QString &fileName) const override; + virtual QString dotCommandsHtmlHelp() const override; //! @} protected: diff --git a/src/blackcore/context/contextapplicationproxy.cpp b/src/blackcore/context/contextapplicationproxy.cpp index 928f7a2f4..21fad64cf 100644 --- a/src/blackcore/context/contextapplicationproxy.cpp +++ b/src/blackcore/context/contextapplicationproxy.cpp @@ -181,6 +181,11 @@ namespace BlackCore return this->m_dBusInterface->callDBusRet(QLatin1String("existsFile"), fileName); } + QString CContextApplicationProxy::dotCommandsHtmlHelp() const + { + return this->m_dBusInterface->callDBusRet(QLatin1String("dotCommandsHtmlHelp")); + } + bool CContextApplicationProxy::isContextResponsive(const QString &dBusAddress, QString &msg, int timeoutMs) { const bool connected = CDBusServer::isDBusAvailable(dBusAddress, msg, timeoutMs); diff --git a/src/blackcore/context/contextapplicationproxy.h b/src/blackcore/context/contextapplicationproxy.h index 2d5cde774..0abee1bdd 100644 --- a/src/blackcore/context/contextapplicationproxy.h +++ b/src/blackcore/context/contextapplicationproxy.h @@ -72,6 +72,7 @@ namespace BlackCore virtual QString readFromFile(const QString &fileName) const override; virtual bool removeFile(const QString &fileName) override; virtual bool existsFile(const QString &fileName) const override; + virtual QString dotCommandsHtmlHelp() const override; //! @} //! Used to test if there is a core running?