#include "CompetitorWithResults.h" bool CompetitorWithResults::setResults(const QJsonObject &results) { if (!results.contains("mark") || !results.contains("medalType")) { throw invalid_argument("Results object of competitor is incomplete."); } this->results = { {QString("mark"), results["mark"].toString()}, {QString("medalType"), results["medalType"].toString()} }; return true; }