diff --git a/src/blackgui/components/commandinput.cpp b/src/blackgui/components/commandinput.cpp index ae6f6b112..492a92b1b 100644 --- a/src/blackgui/components/commandinput.cpp +++ b/src/blackgui/components/commandinput.cpp @@ -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(); diff --git a/src/blackmisc/simplecommandparser.cpp b/src/blackmisc/simplecommandparser.cpp index cd917ca39..ca1e7cae1 100644 --- a/src/blackmisc/simplecommandparser.cpp +++ b/src/blackmisc/simplecommandparser.cpp @@ -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; }