| 479 | } |
| 480 | |
| 481 | void Preference::loadValidTexts(const std::string &pathOfValidTexts) { |
| 482 | std::string fileContent = loadFileContent(pathOfValidTexts); |
| 483 | if (fileContent.empty()) |
| 484 | return; |
| 485 | this->_validTexts.clear(); |
| 486 | std::vector<std::string> validStringLines; |
| 487 | splitString(fileContent, validStringLines, '\n'); |
| 488 | for (auto &line: validStringLines) { |
| 489 | auto iter = line.find(": "); |
| 490 | if (iter != std::string::npos && |
| 491 | line.find("String #") != std::string::npos) { |
| 492 | this->_validTexts.emplace(line.substr(iter + 2)); |
| 493 | } else { |
| 494 | this->_validTexts.emplace(line); |
| 495 | } |
| 496 | } |
| 497 | if (!this->_validTexts.empty()) |
| 498 | this->_pruningValidTexts = true; |
| 499 | } |
| 500 | |
| 501 | void Preference::loadConfigs() { |
| 502 | #if defined(__ANDROID__) || defined(_DEBUG_) |
nothing calls this directly
no test coverage detected