1
0
Fork 0

Launcher: tweak to be compatible with older Qt

This commit is contained in:
James Turner 2018-03-01 11:34:53 +00:00
parent f760b8cd8f
commit e571564c59

View file

@ -105,8 +105,10 @@ bool CatalogListModel::setData(const QModelIndex &index, const QVariant &value,
Qt::ItemFlags CatalogListModel::flags(const QModelIndex &index) const Qt::ItemFlags CatalogListModel::flags(const QModelIndex &index) const
{ {
auto r = QAbstractListModel::flags(index); Qt::ItemFlags r = Qt::ItemIsSelectable;
const auto cat = m_catalogs.at(index.row()); const auto cat = m_catalogs.at(index.row());
r.setFlag(Qt::ItemIsEnabled, cat->isEnabled()); if (cat->isEnabled()) {
r |= Qt::ItemIsEnabled;
}
return r; return r;
} }