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

Method getStringList

pj_runtime/src/QSettingsBackend.cpp:33–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33std::optional<std::vector<std::string>> QSettingsBackend::getStringList(std::string_view key) {
34 const QString qkey = toKey(key);
35 if (!settings_.contains(qkey)) {
36 return std::nullopt;
37 }
38 std::vector<std::string> out;
39 const QStringList list = settings_.value(qkey).toStringList();
40 out.reserve(static_cast<size_t>(list.size()));
41 for (const QString& item : list) {
42 out.push_back(item.toStdString());
43 }
44 return out;
45}
46
47void QSettingsBackend::setStringList(std::string_view key, const std::vector<std::string>& values) {
48 QStringList list;

Callers 1

TESTFunction · 0.80

Calls 5

toKeyFunction · 0.85
reserveMethod · 0.80
containsMethod · 0.45
valueMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.64