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

Method loadFromFile

src/Deploy/src/configparser.cpp:383–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383bool ConfigParser::loadFromFile(const QString& confFile) {
384 QFile file(confFile);
385 QString confFilePath = QFileInfo(confFile).absolutePath();
386
387 if (file.open(QIODevice::ReadOnly)) {
388 auto doc = QJsonDocument::fromJson(file.readAll());
389
390 if (!doc.isObject()) {
391 return false;
392 }
393
394 auto obj = doc.object();
395 const auto keys = obj.keys();
396 for (const auto &key: keys) {
397 readKey(key, obj, confFilePath);
398 }
399
400 file.close();
401
402 return true;
403 }
404
405 return false;
406}
407
408bool ConfigParser::initDistroStruct() {
409

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected