Review Request 120195: [OS X] make sure the appropriate menu items get put in the Application menu's About and Preferences items

Marko Käning mk-lists at email.de
Sun Sep 14 10:30:51 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120195/#review66450
-----------------------------------------------------------


Hi René, you're amazing! The pace of yours... :-)

Could it be that this issue https://bugs.kde.org/show_bug.cgi?id=333180 is related to this RR?

And what about this one here: https://bugs.kde.org/show_bug.cgi?id=332602 ?

Greets,
Marko

- Marko Käning


On Sept. 14, 2014, 12:24 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120195/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2014, 12:24 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> This is a complement to https://git.reviewboard.kde.org/r/120149/
> 
> OS X has a so-called Application menu, sitting in the MenuBar between the Apple (?) menu and the File menu, that has items (actions) such as About and Preferences, which are meant to play the respective roles for the application.
> 
> Qt4 for Mac uses `QAction::text()` based heuristics to decide which items get `PreferencesRole`, `AboutRole` etc. roles and thus are put in the Application menu. This works fine for applications that create the standard menu actions via KStandardAction. Applications that do not adhere to that scheme, or that create menu actions with matching names *before* the standard actions will end up having the wrong actions in the Application menu. For KDevelop, this means that the About menu item will invoke `About KDevelop Platform` and the Preferences item `Configure selection` (normally in the Project menu). The former misinterpretation isn't a huge deal, but launching a project's configure/cmake procedure (without any kind of confirmation asked) when you think you'll be opening a settings panel is more than just annoying.
> 
> The patch is simple: set the "incriminated" actions' `menuRole` to `NoRole` when they are created, on OS X. This prevents them from being put in the Application menu even when the patches from the above RR are not installed (though in that latter case the Preferences menu will probably invoke another unintended action).
> 
> 
> Diffs
> -----
> 
>   shell/mainwindow_p.cpp b50c444 
> 
> Diff: https://git.reviewboard.kde.org/r/120195/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.6.8 with KDE/MacPorts 4.12.5 and kdelibs git/master with all MacPorts and my patches applied. Other platforms will not be affected by this patch.
> 
> I have not yet looked into how this plays out on Qt5/KF5. The patch presented here should have the same effect if menu roles function the same way as in Qt4. If Qt5 uses comparable heuristics and `KAction` made the transition to KF5, the other kdelibs patches should port over easily.
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140914/a962f748/attachment.html>


More information about the KDevelop-devel mailing list