Re: Whence the accelerators?

Kevin Funk <[email protected]>
Newsgroups gmane.comp.kde.users.kdevelop
Message-ID <18224071.TKrFexaiOt@kerberos>
On Friday, 5 May 2017 10:55:27 CEST Alexander Zhigalin wrote:
> Hello
>  
> 05.05.2017, 10:17, "Kevin Funk" <[email protected]>:
> On Thursday, 4 May 2017 21:40:00 CEST Matthew Woehlke wrote:
> 
>  In KDevelop 4.x, I got used to being able to right-click a project and
>  hit 'b' to quickly build that project.
> 
>  In KDevelop 5.1.0, this doesn't work; in fact, the project context menu
>  doesn't appear to have *any* accelerators. Did something happen to them,
>  or have I turned them off somehow?
> 
> This was a KMenu (from kdelibs) feature [1] -- which is deprecated nowadays.
> During the kdelibs (Qt4) -> KF5 (Qt5) transition we ported all uses of
> KMenu to QMenu, which doesn't have this feature.
> 
> 
> [1] See:
>   https://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKMenu.html#a1c
> 4c4b910df899d814e511e357283bcd
> 
> You'd need to port KMenu's accelerator feature to QMenu to fix.
> 
> But we can use the Alt key, right?
> Now in the project context menu (see screenshot) there are alt-bindings only
> for "copy" and "paste" entries... 

Hmm, true.

And actually just opening that menu and pressing 'c' or 'p' has the desired 
effect. So it's indeed just related to those other specific actions in that 
menu. The feature in general works.

Seems like those actions just don't have proper accelerators in their titles. 
I'd say: patches welcome!

See:
  ProjectManagerViewPlugin::contextMenuExtension( KDevelop::Context* context )
    in kdevplatform.git

I think the key difference is that under kdelibs, KMenu generated accelerators 
on the fly for all actions in the menu; while QMenu does not do that => thus 
we have to add accelerators ourselves.

Again, patches or more debugging welcome, for those who'd like to have this 
feature fixed.

Greets,
Kevin

> Cheers,
> Kevin
>  
> 
> --
> Kevin Funk | [email protected] | http://kfunk.org
>  
>  
> -- 
> Alexander Zhigalin - DevOps
>  


-- 
Kevin Funk | [email protected] | http://kfunk.org
signature.asc (application/pgp-signature, 163 B)
-----BEGIN PGP SIGNATURE-----

iEYEABECAAYFAlkMRoAACgkQxkz1axPKzl0+2ACfUxJEoQ7RDWK5BeToanlhK2r6
90sAnRSBhPEmGD4eJ0rVHhkJX4oYX+9l
=o0nL
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.