Add opt-in for showing mod incompatibilities

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2026-02-12 21:03:59 +00:00
parent b664846030
commit 71278ff7ea
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
4 changed files with 22 additions and 7 deletions

View file

@ -503,7 +503,7 @@ bool ResourceFolderModel::validateIndex(const QModelIndex& index) const
// and they only delegate to the superclass for compatible columns
QBrush ResourceFolderModel::rowBackground(int row) const
{
if (m_resources[row]->hasIssues()) {
if (APPLICATION->settings()->get("ShowModIncompat").toBool() && m_resources[row]->hasIssues()) {
return { QColor(255, 0, 0, 40) };
} else {
return {};
@ -538,8 +538,10 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
QString tooltip = m_resources[row]->internal_id();
if (column == NameColumn) {
for (const QString& issue : at(row).issues()) {
tooltip += "\n" + issue;
if (APPLICATION->settings()->get("ShowModIncompat").toBool()) {
for (const QString& issue : at(row).issues()) {
tooltip += "\n" + issue;
}
}
if (at(row).isSymLinkUnder(instDirPath())) {
@ -559,7 +561,7 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
}
case Qt::DecorationRole: {
if (column == NameColumn) {
if (at(row).hasIssues()) {
if (APPLICATION->settings()->get("ShowModIncompat").toBool() && at(row).hasIssues()) {
return QIcon::fromTheme("status-bad");
} else if (at(row).isSymLinkUnder(instDirPath()) || at(row).isMoreThanOneHardLink()) {
return QIcon::fromTheme("status-yellow");