From e571564c59fce850ee7134c1d5f4b032d92bc927 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 1 Mar 2018 11:34:53 +0000 Subject: [PATCH] Launcher: tweak to be compatible with older Qt --- src/GUI/CatalogListModel.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GUI/CatalogListModel.cxx b/src/GUI/CatalogListModel.cxx index 3865221c8..4d0de86c3 100644 --- a/src/GUI/CatalogListModel.cxx +++ b/src/GUI/CatalogListModel.cxx @@ -105,8 +105,10 @@ bool CatalogListModel::setData(const QModelIndex &index, const QVariant &value, 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()); - r.setFlag(Qt::ItemIsEnabled, cat->isEnabled()); + if (cat->isEnabled()) { + r |= Qt::ItemIsEnabled; + } return r; }