mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refactor: Directly get HTML help string from parser
The context returns CSimpleCommandParser::commandsHtmlHelp() as well
This commit is contained in:
@@ -149,9 +149,6 @@ namespace BlackCore
|
||||
//! Forward to facade
|
||||
virtual bool parseCommandLine(const QString &commandLine, const BlackMisc::CIdentifier &originator) override;
|
||||
|
||||
//! The HTML help for dot commands
|
||||
virtual QString dotCommandsHtmlHelp() const = 0;
|
||||
|
||||
protected:
|
||||
static constexpr int PingIdentifiersMs = 20000; //!< how often identifiers are pinged
|
||||
|
||||
|
||||
@@ -131,13 +131,6 @@ namespace BlackCore
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::CIdentifier();
|
||||
}
|
||||
|
||||
//! \copydoc IContextApplication::dotCommandsHtmlHelp
|
||||
virtual QString dotCommandsHtmlHelp() const override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return QString();
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -146,9 +146,4 @@ namespace BlackCore::Context
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategories::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
return this->identifier();
|
||||
}
|
||||
|
||||
QString CContextApplication::dotCommandsHtmlHelp() const
|
||||
{
|
||||
return CSimpleCommandParser::commandsHtmlHelp();
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -83,9 +83,6 @@ namespace BlackCore
|
||||
//! \copydoc BlackCore::Context::IContextApplication::getApplicationIdentifier
|
||||
virtual BlackMisc::CIdentifier getApplicationIdentifier() const override;
|
||||
|
||||
//! \copydoc BlackCore::Context::IContextApplication::dotCommandsHtmlHelp
|
||||
virtual QString dotCommandsHtmlHelp() const override;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CContextApplication(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime);
|
||||
|
||||
@@ -129,11 +129,6 @@ namespace BlackCore::Context
|
||||
return m_dBusInterface->callDBusRet<BlackMisc::CIdentifier>(QLatin1String("getApplicationIdentifier"));
|
||||
}
|
||||
|
||||
QString CContextApplicationProxy::dotCommandsHtmlHelp() const
|
||||
{
|
||||
return m_dBusInterface->callDBusRet<QString>(QLatin1String("dotCommandsHtmlHelp"));
|
||||
}
|
||||
|
||||
void CContextApplicationProxy::reRegisterApplications()
|
||||
{
|
||||
if (!m_dBusInterface) { return; }
|
||||
|
||||
@@ -86,9 +86,6 @@ namespace BlackCore
|
||||
//! \copydoc BlackCore::Context::IContextApplication::getApplicationIdentifier
|
||||
virtual BlackMisc::CIdentifier getApplicationIdentifier() const override;
|
||||
|
||||
//! \copydoc BlackCore::Context::IContextApplication::dotCommandsHtmlHelp
|
||||
virtual QString dotCommandsHtmlHelp() const override;
|
||||
|
||||
//! Used to test if there is a core running?
|
||||
//! \note creates and connects via proxy object, so not meant for very frequent tests
|
||||
//! \sa CDBusServer::isDBusAvailable as lightweight, but less accurate alternative
|
||||
|
||||
@@ -81,12 +81,9 @@ namespace BlackGui::Components
|
||||
|
||||
void CCommandInput::setCommandToolTip()
|
||||
{
|
||||
const bool context = (sGui && sGui->getIContextApplication());
|
||||
if (m_showToolTip)
|
||||
{
|
||||
this->setToolTip(context ?
|
||||
sGui->getIContextApplication()->dotCommandsHtmlHelp() :
|
||||
CSimpleCommandParser::commandsHtmlHelp());
|
||||
this->setToolTip(CSimpleCommandParser::commandsHtmlHelp());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user