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

Function computeIndent

app/src/DataModel/Editors/CodeFormatter.cpp:618–625  ·  view source on GitHub ↗

* @brief Returns the rendered indentation string for a line. */

Source from the content-addressed store, hash-verified

616 * @brief Returns the rendered indentation string for a line.
617 */
618static QString computeIndent(int depth, int outdentLeading, int indentSpaces)
619{
620 int rendered = depth - outdentLeading;
621 if (rendered < 0)
622 rendered = 0;
623
624 return QString(rendered * indentSpaces, QLatin1Char(' '));
625}
626
627/**
628 * @brief Reformats one line based on its scanner state, brace depth and hanging indent.

Callers 1

reformatOneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected