| 364 | } |
| 365 | |
| 366 | bool cmQtAutoGenerator::InfoT::GetArrayConfig(std::string const& key, |
| 367 | std::vector<std::string>& list, |
| 368 | bool required) const |
| 369 | { |
| 370 | { // Try config |
| 371 | std::string const configKey = this->ConfigKey(key); |
| 372 | Json::Value const& jval = this->Json_[configKey]; |
| 373 | if (!jval.isNull()) { |
| 374 | if (!jval.isArray()) { |
| 375 | return this->LogError(cmStrCat(configKey, " is not an array string.")); |
| 376 | } |
| 377 | if (!GetJsonArray(list, jval) && required) { |
| 378 | return this->LogError(cmStrCat(configKey, " is empty.")); |
| 379 | } |
| 380 | return true; |
| 381 | } |
| 382 | } |
| 383 | // Try plain |
| 384 | return this->GetArray(key, list, required); |
| 385 | } |
| 386 | |
| 387 | bool cmQtAutoGenerator::InfoT::LogError(GenT genType, |
| 388 | cm::string_view message) const |