mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
feat: display mod dependencies
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
66f0f95fd7
commit
947656df0f
6 changed files with 256 additions and 136 deletions
|
|
@ -383,3 +383,20 @@ bool ModFolderModel::setResourceEnabled(const QModelIndexList& indexes, EnableAc
|
|||
auto affected = getAffectedMods(indexes, action);
|
||||
return ResourceFolderModel::setResourceEnabled(indexes + affected, action);
|
||||
}
|
||||
|
||||
QStringList reqToList(QList<Mod*> l)
|
||||
{
|
||||
QStringList req;
|
||||
for (auto m : l) {
|
||||
req << m->name();
|
||||
}
|
||||
return req;
|
||||
}
|
||||
QStringList ModFolderModel::requiresList(QString id)
|
||||
{
|
||||
return reqToList(m_requires[id]);
|
||||
}
|
||||
QStringList ModFolderModel::requiredByList(QString id)
|
||||
{
|
||||
return reqToList(m_requiredBy[id]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue