fixing Ctrl+A shortcut in konqueror location bar

Germain Garand germain at ebooksfrance.org
Fri Jan 4 15:39:15 GMT 2008


Le Lundi 24 Décembre 2007 13:42, Hamish Rodda a écrit :
> On Mon, 24 Dec 2007 08:57:15 pm David Faure wrote:
> > On Tuesday 11 December 2007, Matt Rogers wrote:
> > > Hi,
> > >
> > > The fact that the Ctrl+A shortcut in konqueror's location bar hasn't
> > > worked for awhile now has really bugged me. I sat down to fix it
> > > tonight and came up with the attached patch.
> > >
> > > However, the patch is bogus. While it allows me to use Ctrl+A
> > > successfully in the location bar, using the same shortcut in the khtml
> > > part is now broken. If someone could provide some guidance on how I
> > > could fix this, I'd appreciate it
> >
> > Probably because the KHTMLView doesn't have focus, its viewport has.
> > I guess this needs Qt-4.4's new enum value in Qt::ShortcutContext (forgot
> > the exact name) which includes child widgets. (so, not fixable yet)
>
> I don't know the code in question but to get around missing
> Qt::WidgetAndChidrenShortcut (or whatever it's called, I forget again) that
> I've so far just been using foreach (QWidget* widget,
> findChildren<QWidget*>()) actionCollection->associateWidget(widget);
> (wrapped in version ifdefs, of course).
>

I just noticed the KHTMLView is actually never associated to the 
actionCollection() after those actions are added, so there's no wonder it 
doesn't work...

The attached is apparently enough to make it behave as expected everywhere
(i.e also in form elements of khtmlview, and in subframes).

I wonder if this could be commited to branch despite release freeze?
it certainly look like a very ennoying bug.

Germain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 916 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080104/f7d3367d/attachment.diff>


More information about the kde-core-devel mailing list