Launcher add-ons: tweak display of missing version
Show missing min/max FG version as ‘-‘ to avoid a translation headache. Thanks to Slawek Mikula for the suggestion.
This commit is contained in:
parent
d6b7eaf60f
commit
ebdf34e81a
1 changed files with 10 additions and 3 deletions
|
@ -111,7 +111,8 @@ QVariant AddonsModel::get(int idx, int role) const
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
else if (role == VersionRole) {
|
else if (role == VersionRole) {
|
||||||
return QString::fromStdString(addon->getVersion()->str());
|
const auto v = addon->getVersion()->str();
|
||||||
|
return QString::fromStdString(v);
|
||||||
}
|
}
|
||||||
else if (role == AuthorsRole) {
|
else if (role == AuthorsRole) {
|
||||||
QStringList authors;
|
QStringList authors;
|
||||||
|
@ -147,10 +148,16 @@ QVariant AddonsModel::get(int idx, int role) const
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
else if (role == MinFGVersionRole) {
|
else if (role == MinFGVersionRole) {
|
||||||
return QString::fromStdString(addon->getMinFGVersionRequired());
|
const auto v = addon->getMinFGVersionRequired();
|
||||||
|
if (v == "none")
|
||||||
|
return QStringLiteral("-");
|
||||||
|
return QString::fromStdString(v);
|
||||||
}
|
}
|
||||||
else if (role == MaxFGVersionRole) {
|
else if (role == MaxFGVersionRole) {
|
||||||
return QString::fromStdString(addon->getMaxFGVersionRequired());
|
const auto v = addon->getMaxFGVersionRequired();
|
||||||
|
if (v == "none")
|
||||||
|
return QStringLiteral("-");
|
||||||
|
return QString::fromStdString(v);
|
||||||
}
|
}
|
||||||
else if (role == HomePageRole) {
|
else if (role == HomePageRole) {
|
||||||
return QUrl(QString::fromStdString(addon->getHomePage()));
|
return QUrl(QString::fromStdString(addon->getHomePage()));
|
||||||
|
|
Loading…
Reference in a new issue