Old code prevents loading of non-"EnabledByDefault" plugins, even if are was checked by user for loading. The affected plugin - kdevmanpage from kdevelop, now it successfully loads if selected by user.
Details
- Reviewers
mwolff antonanikin - Group Reviewers
KDevelop - Commits
- R32:9d73ce1523b7: Fix PluginController::isEnabled
Diff Detail
- Repository
- R33 KDevPlatform
- Branch
- 5.0
- Lint
No Linters Available - Unit
No Unit Test Coverage
Hmm, this appears to be the wrong fix, no?
The *EnabledByDefault* property needs to be read somewhere.
What about:
if (!isUserSelectable) return true; if (userEnabled) // the code from below return true; if (!isGlobalPlugin) return enabledByDefault.isNull() || enabledByDefault.toBool();
Makes sense? Maybe I'm missing something...
The *EnabledByDefault* property needs to be read somewhere.
Hi, Kevin!
https://techbase.kde.org/Development/Tutorials/Kate/KTextEditor_Plugins says:
X-KDE-PluginInfo-EnabledByDefault: whether the plugin is enabled by default. Applied when clicking on "Defaults" button on the plugin selector.
I grep sources of kdevplatform and kdevelop and found that all plugins are "EnabledByDefault" except KDevManPage. It seems that this setting is not used anywhere except in removed code (I can't find something other). I think that we сan safely remove this code without negative consequences, since EnabledByDefault field is only used for setting the initial value of appropriate plugin's property.
yeah seems like enabledbydefault is really dead so getting rid of this seems to be a good idea
still lgtm, one minor style issue only
shell/plugincontroller.cpp | ||
---|---|---|
248 | please introduce a temporary for the default plugins map |