MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / joinArray

Function joinArray

src/gui/SliceTroubleshootingDialog.cpp:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46QString joinArray(const QJsonArray& array, const QString& emptyText = "(none)")
47{
48 QStringList values;
49 values.reserve(array.size());
50 for (const QJsonValue& value : array) {
51 if (value.isString())
52 values << value.toString();
53 else if (value.isDouble())
54 values << QString::number(value.toDouble());
55 else if (value.isBool())
56 values << (value.toBool() ? "true" : "false");
57 }
58 return values.isEmpty() ? emptyText : values.join(", ");
59}
60
61QString formatNumber(const QJsonValue& value, int decimals = 2, const QString& suffix = {})
62{

Callers 1

buildSummaryMethod · 0.85

Calls 3

sizeMethod · 0.45
toStringMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected