[frameworks-kxmlgui] [Bug 369276] KActionCollection, menu/action reuse and the native Mac menubar

2016-11-07 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=369276

RJVB  changed:

   What|Removed |Added

 CC||cullm...@kde.org

--- Comment #5 from RJVB  ---
So, I should have reread my original report...

The Mode and Highlighting menus are provided by the KTextEditor framework.
They're both KActionMenu instances, so QWidgetActions. However, they are
populated with QAction* instances, and it's those instances that are
problematic. The Mode and Highlighting menus themselves appear and appear to
work as they should in themselves.

Distilling this into a simple test case seems a rather daunting task ...

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 369276] KActionCollection, menu/action reuse and the native Mac menubar

2016-11-06 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=369276

--- Comment #4 from RJVB  ---
I guess this depends on exactly what you use it for in the toolbar, but yes,
it's possible.

The problem is a bit that I'm not perfectly sure exactly which classes are
concerned. The last time I've seen a real problem arise was with Kate's (and
thus KDevelop's) Mode and Highlighting menus. IIRC those are populated with
QAction instances; the symptom was that most items were disabled and some never
appeared. That corresponds to what is written in the docs for *QWidgetAction* :

OS X: If you add a widget to a menu in the application's menu bar on OS X,
the widget will be added and it will function but with some limitations:
1. The widget is reparented away from the QMenu to the native menu view. If
you show the menu in some other place (e.g. as a popup menu), the widget will
not be there.

What makes this extra annoying is that it is hard to predict exactly what
happens. The claim above ("will not be there") is not necessarily true for
instance, at least not always. Usually I've been able to see the items in both
the native menu and a context menu, for instance. And the Mode/Highlighting
issue in Kate weren't affected from my first attempts with KF5 (Kate was the
1st app I built). They worked, but the Bookmark menu didn't; the Mode and
Highlighting menus were affected only recently but the code didn't or hardly
change. IOW, the actual effects of the reparenting *may* depend on the order in
which things happen, which could depend on changes in related code (kxmlgui..)
or even compiler options (I think). 

I'll try to find some time tomorrow to see exactly what was being added to
those Kate menus that remained disabled (but I take it that the limitation
would be almost just as unacceptable for QWidgetActions?).

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 369276] KActionCollection, menu/action reuse and the native Mac menubar

2016-11-06 Thread David Faure
https://bugs.kde.org/show_bug.cgi?id=369276

--- Comment #3 from David Faure  ---
Amazing.

So a QAction in both a toolbar and a menu in the native menubar is OK?
Or as soon as a QAction is in a native menu (short for "menu in the native
menubar") it can't be used anywhere else? This totally defeats the QAction
concept, asking apps to create multiple QActions and keep them in sync. We're
back to Qt 2 then...

If you open a Qt bug report I can weigh in about how unacceptable this is ;)

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 369276] KActionCollection, menu/action reuse and the native Mac menubar

2016-11-06 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=369276

RJVB  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #2 from RJVB  ---
The thing is that their documentation makes it clear that you cannot add a
QAction to multiple menus if one of them corresponds to a menu item in a menu
that's part of the native menubar.
I've already tried to discuss this on the Qt MLs (development, I think), but
that didn't lead anywhere. Which makes me think that they don't consider this a
bug, simply a limitation that we have to live with. That's also how they
treated the bug report about "texted" menu sections which don't work on OS X
that way: just don't use them.
The only difference here is that in this case one can make a point that the
limitation didn't exist in Qt4, and thus is a feature regression.

So no, this issue is not resolved (I'll leave it closed though).

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 369276] KActionCollection, menu/action reuse and the native Mac menubar

2016-11-06 Thread David Faure
https://bugs.kde.org/show_bug.cgi?id=369276

David Faure  changed:

   What|Removed |Added

 Resolution|--- |UPSTREAM
 Status|UNCONFIRMED |RESOLVED
 CC||fa...@kde.org

--- Comment #1 from David Faure  ---
The basic QAction concept is that you can add the same action to multiple
widgets.
If this doesn't work in some cases, it's a Qt bug, not a problem in
KActionCollection (which is really just a container of qactions). 

=> report this on the Qt bug tracker. Preferrably with an actual testcase.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 369276] KActionCollection, menu/action reuse and the native Mac menubar

2016-09-27 Thread Marko Käning via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=369276

Marko Käning  changed:

   What|Removed |Added

 CC||mk-li...@mailbox.org

-- 
You are receiving this mail because:
You are watching all bug changes.