From kde-core-devel Mon Jul 30 02:33:05 2007 From: Hamish Rodda Date: Mon, 30 Jul 2007 02:33:05 +0000 To: kde-core-devel Subject: Re: setDefaultShortcutContext in KActionCollection (was: Re: Message-Id: <200707301233.09378.rodda () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=118576282932058 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart6248838.CY0oV58Spe" --nextPart6248838.CY0oV58Spe Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 28 Jul 2007 05:13:48 pm Thomas Zander wrote: > On Wednesday 25 July 2007 15:41:25 Robin Stocker wrote: > > So, with setDefaultShortcutContext removed, what is the suggested way > > to get the previous behaviour? > > Set it on the actions individually; remember the default is a > Qt::WindowShortcut so it works for you out of the box. But basically if > you need it changed, then do it on your own. KActionCollection is > keeping its hands off of that option. > Which I think is correct; its just a collection afterall. Actually, setAssociatedWidget and addAssociatedWidget change the shortcut=20 context to Qt::WidgetShortcut, to retain compatibility with kde3 KAccel. N= ow=20 that these extra methods are removed, there's not really a clean way to do= =20 this other than setting the shortcut context after the associated widget ha= s=20 been set up, or to do the work of *AssociatedWidget by hand. We could remove this default but it would mean going through all code which= =20 uses *AssociatedWidget and implementing the widget default where=20 *AssociatedWidget is called, when appropriate. Cheers, Hamish. --nextPart6248838.CY0oV58Spe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGrU3lH8BtnSmIlUYRAgsZAJ0epVAu70d2A0JVOPLXiJp4gAQuAwCgvym8 oLXgmiHhwtpWxMnOgdWgJA0= =6QMU -----END PGP SIGNATURE----- --nextPart6248838.CY0oV58Spe--