| 269 | } |
| 270 | |
| 271 | bool cmQtAutoGenerator::InfoT::GetString(std::string const& key, |
| 272 | std::string& value, |
| 273 | bool required) const |
| 274 | { |
| 275 | Json::Value const& jval = this->Json_[key]; |
| 276 | if (!jval.isString()) { |
| 277 | if (!jval.isNull() || required) { |
| 278 | return this->LogError(cmStrCat(key, " is not a string.")); |
| 279 | } |
| 280 | } else { |
| 281 | value = jval.asString(); |
| 282 | if (value.empty() && required) { |
| 283 | return this->LogError(cmStrCat(key, " is empty.")); |
| 284 | } |
| 285 | } |
| 286 | return true; |
| 287 | } |
| 288 | |
| 289 | bool cmQtAutoGenerator::InfoT::GetStringConfig(std::string const& key, |
| 290 | std::string& value, |