forked from qt-creator/qt-creator
PluginView: Do not disable required plugins
It was possible to disable required plugins by deselecting the whole category. Task-number: QTCREATORBUG-16321 Change-Id: I983a3461ac0cf610f9cd5e4ffcec5e176256eb53 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -266,10 +266,9 @@ public:
|
|||||||
bool setData(int column, const QVariant &data, int role)
|
bool setData(int column, const QVariant &data, int role)
|
||||||
{
|
{
|
||||||
if (column == LoadedColumn && role == Qt::CheckStateRole) {
|
if (column == LoadedColumn && role == Qt::CheckStateRole) {
|
||||||
QSet<PluginSpec *> affectedPlugins;
|
const QList<PluginSpec *> affectedPlugins =
|
||||||
foreach (TreeItem *item, children())
|
Utils::filtered(m_plugins, [](PluginSpec *spec) { return !spec->isRequired(); });
|
||||||
affectedPlugins.insert(static_cast<PluginItem *>(item)->m_spec);
|
if (m_view->setPluginsEnabled(affectedPlugins.toSet(), data.toBool())) {
|
||||||
if (m_view->setPluginsEnabled(affectedPlugins, data.toBool())) {
|
|
||||||
update();
|
update();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user