don't parse excluded types from config variant map

This commit is contained in:
Stephen Birarda 2014-04-08 14:05:26 -07:00
parent 9a9939c11a
commit 9ca864bb50

View file

@ -226,18 +226,19 @@ void DomainServer::parseAssignmentConfigs(QSet<Assignment::Type>& excludedTypes)
// figure out which assignment type this matches // figure out which assignment type this matches
Assignment::Type assignmentType = (Assignment::Type) assignmentConfigRegex.cap(1).toInt(); Assignment::Type assignmentType = (Assignment::Type) assignmentConfigRegex.cap(1).toInt();
QVariant mapValue = _argumentVariantMap[variantMapKeys[configIndex]]; if (assignmentType < Assignment::AllTypes && !excludedTypes.contains(assignmentType)) {
QVariant mapValue = _argumentVariantMap[variantMapKeys[configIndex]];
if (mapValue.type() == QVariant::String) { if (mapValue.type() == QVariant::String) {
qDebug() << mapValue.toString(); QJsonDocument deserializedDocument = QJsonDocument::fromJson(mapValue.toString().toUtf8());
QJsonDocument deserializedDocument = QJsonDocument::fromJson(mapValue.toString().toUtf8()); createStaticAssignmentsForType(assignmentType, deserializedDocument.array());
createStaticAssignmentsForType(assignmentType, deserializedDocument.array()); } else {
} else { createStaticAssignmentsForType(assignmentType, mapValue.toJsonValue().toArray());
createStaticAssignmentsForType(assignmentType, mapValue.toJsonValue().toArray()); }
excludedTypes.insert(assignmentType);
} }
excludedTypes.insert(assignmentType);
configIndex = variantMapKeys.indexOf(assignmentConfigRegex, configIndex + 1); configIndex = variantMapKeys.indexOf(assignmentConfigRegex, configIndex + 1);
} }
} }