Don't show Plugins menu if built without KIPI support
ClosedPublic

Authored by volkov on Sep 4 2018, 4:09 PM.

Diff Detail

Repository
R260 Gwenview
Branch
hide-plugins-menu
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2680
Build 2698: arc lint + arc unit
volkov created this revision.Sep 4 2018, 4:09 PM
Restricted Application added a project: Gwenview. · View Herald TranscriptSep 4 2018, 4:09 PM
volkov requested review of this revision.Sep 4 2018, 4:09 PM

The empty menu looked really odd.
Maybe it would be better to not only depend on KIPI's absence, but it's the only one using Plugins ATM and because of the delayed population it's a bit tricky to check for an empty menu.
So I think it's ok to hide it this way, if there are no objections from anybody else.

app/mainwindow.cpp
867

I think auto* pluginsMenu (or QMenu* pluginsMenu) is the preferred style for Gwenview. (Same in D15271.)

ngraham added a subscriber: ngraham.Sep 7 2018, 1:42 PM

But the menu isn't empty, is it? It has "Install Plugins" in it, which lets you populate it.

But the menu isn't empty, is it? It has "Install Plugins" in it, which lets you populate it.

That's the problem - the menu is always empty until the user clicks on Plugins.
In KIPIInterface::loadOnePlugin() the KIPI plugins are loaded or if not found a dummy action Install Plugins is added.

Ah I see, if kipi support wasn't compiled in, then without this patch the menu will *always* be empty, right?

volkov updated this revision to Diff 41328.Sep 10 2018, 10:17 AM

style fix

muhlenpfordt accepted this revision.Sep 10 2018, 11:29 AM
This revision is now accepted and ready to land.Sep 10 2018, 11:29 AM
volkov closed this revision.Sep 10 2018, 11:44 AM