MCPcopy Create free account
hub / github.com/QuasarApp/CQtDeployer / readKeyArray

Method readKeyArray

src/Deploy/src/configparser.cpp:278–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278QString ConfigParser::readKeyArray(int separatorLvl, const QJsonArray &array,
279 const QString& confFileDir) const {
280
281 QStringList list;
282
283 for (const QJsonValue &i : array) {
284
285 if (i.isArray()) {
286 list.push_back(readKeyArray(separatorLvl + 1, i.toArray(), confFileDir));
287 } else {
288 QString val = i.toString();
289
290 if (i.type() == QJsonValue::Double) {
291 val = QString::number(i.toDouble(0), 'f');
292 }
293
294 if (!val.isEmpty()) {
295 if (PathUtils::isReleativePath(val)) {
296 list.push_back(QFileInfo(confFileDir + '/' + val).absoluteFilePath());
297 } else {
298 list.push_back(val);
299 }
300 }
301 }
302 }
303
304 return list.join(DeployCore::getSeparator(separatorLvl));
305}
306
307void ConfigParser::readKey(const QString& key, const QJsonObject& obj,
308 const QString& confFileDir) const {

Callers

nothing calls this directly

Calls 2

toStringMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected