| 560 | } |
| 561 | |
| 562 | QUrl ModInfo::parseCustomURL() const |
| 563 | { |
| 564 | if (!hasCustomURL() || url().isEmpty()) { |
| 565 | return {}; |
| 566 | } |
| 567 | |
| 568 | const auto url = QUrl::fromUserInput(this->url()); |
| 569 | |
| 570 | if (!url.isValid()) { |
| 571 | log::error("mod '{}' has an invalid custom url '{}'", name(), this->url()); |
| 572 | return {}; |
| 573 | } |
| 574 | |
| 575 | return url; |
| 576 | } |
no test coverage detected