Disable plugin project config if project without a IBuildSystemManager dep
Summary: The Clazy plugin relies on the project providing a buildsystem manager to query for the toplevel build directory. If a project has no such manager, showing the Clazy plugin config pages in the project settings has no purpose. As a session might contain different projects, some with a buildsystem manager, some without, simply disabling the Clazy plugin might not be wanted for the projects with a buildsystem manager. So we need to have some condition whether to show some plugins per-project config pages or not. For a start, motivated by the crash with the Clazy plugin which has a hard assumption of project->buildSystemManager() being != nullptr, this patch adds to the code to collect the config pages for the project settings dialog some special code which makes use of the plugin metadata to skip plugins which require a org.kdevelop.IBuildSystemManager, if there is no buildsystem manager available for the project. As well adds the (so far missing) entry X-KDevelop-IRequired: [org.kdevelop.IBuildSystemManager] to the metadata. BUG: 400769 Test Plan: Clazy config is no longer shown in the project settings dialog if the project is used with the generic project manager. Reviewers: #kdevelop, apol Reviewed By: #kdevelop, apol Subscribers: kfunk, kdevelop-devel Tags: #kdevelop Differential Revision: https://phabricator.kde.org/D16915
parent
7b9572d3
Please register or sign in to comment