feat: display license and issue tracker

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-05-05 13:46:38 -07:00
parent 3cfcc83ea9
commit 74e7c13a17
8 changed files with 218 additions and 42 deletions

View File

@ -64,8 +64,11 @@ struct ModLicense {
auto parts = license.split(' ');
QStringList notNameParts = {};
for (auto part : parts) {
auto url = QUrl::fromUserInput(part);
if (url.isValid()) {
auto url = QUrl(part);
if (part.startsWith("(") && part.endsWith(")"))
url = QUrl(part.mid(1, part.size() - 2));
if (url.isValid() && !url.scheme().isEmpty() && !url.host().isEmpty()) {
this->url = url.toString();
notNameParts.append(part);
continue;
@ -119,6 +122,10 @@ struct ModLicense {
return *this;
}
bool isEmpty() {
return this->name.isEmpty() && this->id.isEmpty() && this->url.isEmpty() && this->description.isEmpty();
}
};
struct ModDetails