mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
refs #441 Rename COriginator to CIdentifier and rename COriginatorAware to CIdentifiable.
This commit is contained in:
@@ -148,12 +148,12 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
COriginator CTextMessageComponent::componentOriginator()
|
||||
CIdentifier CTextMessageComponent::componentIdentifier()
|
||||
{
|
||||
if (m_originator.getName().isEmpty())
|
||||
m_originator = COriginator(QStringLiteral("TEXTMESSAGECOMPONENT"));
|
||||
if (m_identifier.getName().isEmpty())
|
||||
m_identifier = CIdentifier(QStringLiteral("TEXTMESSAGECOMPONENT"));
|
||||
|
||||
return m_originator;
|
||||
return m_identifier;
|
||||
}
|
||||
|
||||
void CTextMessageComponent::ps_onChangedAircraftCockpit()
|
||||
@@ -366,7 +366,7 @@ namespace BlackGui
|
||||
|
||||
// relay the command
|
||||
if (cl.isEmpty()) { return; }
|
||||
emit commandEntered(cl, componentOriginator());
|
||||
emit commandEntered(cl, componentIdentifier());
|
||||
}
|
||||
|
||||
QString CTextMessageComponent::textMessageToCommand(const QString &enteredLine)
|
||||
@@ -433,9 +433,9 @@ namespace BlackGui
|
||||
this->displayTextMessage(sentMessage);
|
||||
}
|
||||
|
||||
bool CTextMessageComponent::handleGlobalCommandLine(const QString &commandLine, const COriginator &originator)
|
||||
bool CTextMessageComponent::handleGlobalCommandLine(const QString &commandLine, const CIdentifier &originator)
|
||||
{
|
||||
if (originator == componentOriginator()) { return false; }
|
||||
if (originator == componentIdentifier()) { return false; }
|
||||
if (commandLine.isEmpty() || commandLine.startsWith(".")) { return false; }
|
||||
|
||||
// non command input
|
||||
|
||||
Reference in New Issue
Block a user