MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / readSettings

Method readSettings

cp-profiler/src/cpprofiler/conductor.cpp:502–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502void Conductor::readSettings()
503{
504
505 QFile file("settings.json");
506
507 if (!file.exists())
508 {
509 qDebug() << "settings.json not found";
510 return;
511 }
512
513 file.open(QIODevice::ReadWrite | QIODevice::Text);
514
515 auto data = file.readAll();
516
517 auto json_doc = QJsonDocument::fromJson(data);
518
519 if (json_doc.isEmpty())
520 {
521 qDebug() << "settings.json is empty";
522 return;
523 }
524
525 if (json_doc.isObject())
526 {
527
528 auto json_obj = json_doc.object();
529
530 settings_.receiver_delay = json_obj["receiver_delay"].toInt();
531 }
532
533 qDebug() << "settings read";
534}
535
536static std::string getHeatMapUrl(const NameMap &nm,
537 const std::unordered_map<int, int> &con_counts,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected