MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / parseDisplayName

Function parseDisplayName

pj_app/src/FanoutConfig.cpp:75–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75QString parseDisplayName(std::string_view cfg) {
76 if (cfg.empty()) {
77 return QString{};
78 }
79 const QByteArray bytes(cfg.data(), static_cast<qsizetype>(cfg.size()));
80 const auto doc = QJsonDocument::fromJson(bytes);
81 if (!doc.isObject()) {
82 return QString{};
83 }
84 const QJsonValue v = doc.object().value(QStringLiteral("display_name"));
85 return v.isString() ? v.toString() : QString{};
86}
87
88} // namespace PJ::detail

Callers 2

beginLoadMethod · 0.85
TESTFunction · 0.85

Calls 5

toStringMethod · 0.80
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45

Tested by 1

TESTFunction · 0.68