D8492: Make SourceFormatter plugins enablable, hide actions with no plugins
Kevin Funk
noreply at phabricator.kde.org
Thu Nov 16 17:25:11 UTC 2017
kfunk requested changes to this revision.
kfunk added a comment.
This revision now requires changes to proceed.
> Not yet done is to hide the source formatting settings page from the application settings dialog in case no formatters are available.
Not sure if this is over the top.
INLINE COMMENTS
> sourceformattercontroller.cpp:192
> +
> + if (d->sourceFormatters.count() == 1) {
> + d->formatFilesAction->setEnabled(true);
Shouldn't this be `>= 1`?
> sourceformattercontroller.cpp:192
> +
> + if (d->sourceFormatters.count() == 1) {
> + d->formatFilesAction->setEnabled(true);
Would factor this out into a separate function (i.e. `resetUi()` as you did in the other class) and use that from both `pluginLoaded` and `unloadingPlugin`.
> sourceformattercontroller.cpp:725
> +{
> + return (!d->sourceFormatters.isEmpty());
> +}
Minor: Remove extra parens
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D8492
To: kossebau, #kdevelop, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171116/1afbcdc7/attachment-0001.html>
More information about the KDevelop-devel
mailing list