forked from mirror/openmw-tes3mp
addon list in launcher shows addon files with no dependencies (Fixes #2348)
Also, game files must end with ".esm" or ".omwgame".
This commit is contained in:
parent
44d1f43b2b
commit
54e3ebde63
3 changed files with 9 additions and 2 deletions
|
@ -115,9 +115,10 @@ Qt::ItemFlags ContentSelectorModel::ContentModel::flags(const QModelIndex &index
|
|||
return Qt::NoItemFlags;
|
||||
|
||||
Qt::ItemFlags returnFlags;
|
||||
bool gamefileChecked = false;
|
||||
|
||||
// addon can be checked if its gamefile is
|
||||
// ... special case, addon with no dependency can be used with any gamefile.
|
||||
bool gamefileChecked = (file->gameFiles().count() == 0);
|
||||
foreach (const QString &fileName, file->gameFiles())
|
||||
{
|
||||
bool depFound = false;
|
||||
|
|
|
@ -62,6 +62,12 @@ QByteArray ContentSelectorModel::EsmFile::encodedData() const
|
|||
return encodedData;
|
||||
}
|
||||
|
||||
bool ContentSelectorModel::EsmFile::isGameFile() const
|
||||
{
|
||||
return (mGameFiles.size() == 0) &&
|
||||
(mFileName.endsWith(QLatin1String(".esm")) || mFileName.endsWith(QLatin1String(".omwgame")));
|
||||
}
|
||||
|
||||
QVariant ContentSelectorModel::EsmFile::fileProperty(const FileProperty prop) const
|
||||
{
|
||||
switch (prop)
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace ContentSelectorModel
|
|||
.arg(mGameFiles.join(", "));
|
||||
}
|
||||
|
||||
inline bool isGameFile() const { return (mGameFiles.size() == 0); }
|
||||
bool isGameFile() const;
|
||||
QByteArray encodedData() const;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue