D16915: Disable plugin project config if project without a IBuildSystemManager dep
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Thu Nov 15 21:58:49 GMT 2018
kossebau created this revision.
kossebau added a reviewer: KDevelop.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
kossebau requested review of this revision.
REVISION 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.
REPOSITORY
R32 KDevelop
BRANCH
disableclazyclangtidywithnobuildmanager
REVISION DETAIL
https://phabricator.kde.org/D16915
AFFECTED FILES
kdevplatform/shell/projectcontroller.cpp
plugins/clangtidy/kdevclangtidy.json
plugins/clazy/kdevclazy.json
To: kossebau, #kdevelop
Cc: kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181115/69972c33/attachment-0001.html>
More information about the KDevelop-devel
mailing list