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

Method setEncoding

app/src/Console/Handler.cpp:712–724  ·  view source on GitHub ↗

* @brief Changes the text encoding used by send() and plainTextStr(). */

Source from the content-addressed store, hash-verified

710 * @brief Changes the text encoding used by send() and plainTextStr().
711 */
712void Console::Handler::setEncoding(const int encoding)
713{
714 if (encoding < 0 || encoding > SerialStudio::EncEucKr)
715 return;
716
717 const auto newEncoding = static_cast<SerialStudio::TextEncoding>(encoding);
718 if (m_encoding == newEncoding)
719 return;
720
721 m_encoding = newEncoding;
722 m_settings.setValue("Console/Encoding", static_cast<int>(m_encoding));
723 Q_EMIT encodingChanged();
724}
725
726//--------------------------------------------------------------------------------------------------
727// Display helpers

Callers 3

createFileMethod · 0.45
writeHtmlArtifactMethod · 0.45
createCsvFileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected