mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Register "dot commands" for help (CCommandInput)
This commit is contained in:
committed by
Mat Sutcliffe
parent
72334af1e8
commit
84cfec81e7
@@ -26,6 +26,12 @@ namespace BlackGui
|
||||
CLineEditHistory(parent),
|
||||
CIdentifiable(this)
|
||||
{
|
||||
if (!CSimpleCommandParser::registered("BlackGui::Components::CCommandInput"))
|
||||
{
|
||||
CSimpleCommandParser::registerCommand({".tooltip", "toggle dot command tooltip"});
|
||||
CSimpleCommandParser::registerCommand({".help", "show help"});
|
||||
}
|
||||
|
||||
if (this->placeholderText().isEmpty())
|
||||
{
|
||||
this->setPlaceholderText(".dot commands");
|
||||
@@ -91,7 +97,7 @@ namespace BlackGui
|
||||
|
||||
void CCommandInput::onSimulatorPluginChanged(const CSimulatorPluginInfo &info)
|
||||
{
|
||||
Q_UNUSED(info);
|
||||
Q_UNUSED(info)
|
||||
|
||||
// different simulators have different commands
|
||||
m_dsCommandTooltip.inputSignal();
|
||||
@@ -99,7 +105,7 @@ namespace BlackGui
|
||||
|
||||
void CCommandInput::onConnectedServerChanged(const Network::CServer &server)
|
||||
{
|
||||
Q_UNUSED(server);
|
||||
Q_UNUSED(server)
|
||||
|
||||
// commands of network
|
||||
m_dsCommandTooltip.inputSignal();
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace BlackMisc
|
||||
|
||||
bool CSimpleCommandParser::registered(const QString &helpContext)
|
||||
{
|
||||
if (s_registered.contains(helpContext)) { return true; };
|
||||
if (s_registered.contains(helpContext)) { return true; }
|
||||
s_registered.insert(helpContext);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user