| 431 | } |
| 432 | |
| 433 | static void CheckLayerMarkerCharacter(std::shared_ptr<PAGExportSession> session, |
| 434 | pag::Layer* layer) { |
| 435 | for (auto marker : layer->markers) { |
| 436 | auto& comment = marker->comment; |
| 437 | |
| 438 | /* Normal Json */ |
| 439 | QJsonParseError parseError; |
| 440 | QJsonDocument::fromJson(comment.c_str(), &parseError); |
| 441 | if (parseError.error == QJsonParseError::NoError) { |
| 442 | continue; |
| 443 | } |
| 444 | |
| 445 | /* Normal Comment */ |
| 446 | auto posStart = comment.find_first_of('{'); |
| 447 | auto posEnd = comment.find_first_of('}'); |
| 448 | if (posStart == std::string::npos || posEnd == std::string::npos) { |
| 449 | continue; |
| 450 | } |
| 451 | |
| 452 | if (HasChineseCharacter(comment)) { |
| 453 | session->pushWarning(AlertInfoType::MarkerJsonHasChinese, comment); |
| 454 | } else { |
| 455 | session->pushWarning(AlertInfoType::MarkerJsonGrammar, comment); |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | static void CheckLayerDisplacementMap(std::shared_ptr<PAGExportSession> session, |
| 461 | pag::Layer* layer) { |
no test coverage detected