Reimplemented dependency selection feature

Moved more code to ContentSelector
Added support for omwgame and omwaddon files
This commit is contained in:
graffy76 2013-08-17 19:40:28 -05:00
parent b24dd5c6ac
commit 2878f51cd3
10 changed files with 99 additions and 227 deletions

View file

@ -2,7 +2,7 @@
#include "datafilesmodel.hpp"
PluginsProxyModel::PluginsProxyModel(QObject *parent, DataFilesModel *model) :
QSortFilterProxyModel(parent), mSourceModel (model)
QSortFilterProxyModel(parent)
{
setFilterRegExp (QString("addon"));
setFilterRole (Qt::UserRole);
@ -25,7 +25,7 @@ QVariant PluginsProxyModel::data(const QModelIndex &index, int role) const
if (index.column() != 0)
return QVariant();
return mSourceModel->checkState(index);
return static_cast<DataFilesModel *>(sourceModel())->checkState(mapToSource(index));
}
};