MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / addToHistory

Method addToHistory

app/src/Console/Handler.cpp:1080–1088  ·  view source on GitHub ↗

* @brief Registers @a command in the list of sent commands. */

Source from the content-addressed store, hash-verified

1078 * @brief Registers @a command in the list of sent commands.
1079 */
1080void Console::Handler::addToHistory(const QString& command)
1081{
1082 while (m_historyItems.count() > 100)
1083 m_historyItems.removeFirst();
1084
1085 m_historyItems.append(command);
1086 m_historyItem = m_historyItems.count();
1087 Q_EMIT historyItemChanged();
1088}
1089
1090/**
1091 * @brief Converts @a data to a string according to the active display mode.

Callers

nothing calls this directly

Calls 2

countMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected