Shortcuts / konsolepart conflict

Michael Jansen kde at michael-jansen.biz
Sat Mar 29 18:03:22 GMT 2008


Am Samstag 29 März 2008 11:18:31 schrieb Anders Lund:
> On lørdag 29 Marts 2008, Eduardo Robles Elvira wrote:
> > Some time ago David Faure told me that this should be fixed with Qt 4.4
> > because it has support for WidgetWithChildrenShortcut. I'm using Qt 4.4
> > with trunk and it's not fixed though, so the fix is not automatic or it's
> > not working. I was also told that all this have to do with KAccel not
> > being in use in KDE anymore.
>
> AFAIK the new kded shortcut module prevents it from working. But I may be
> wrong, which is one of the reasons for my mail :)

I'm pretty sure that's not the case.

But i think we can work this out. There are 4 contexts for shortcuts. ( see 
docu of Qt::ShortcutContext )

And as i could see from the code all shortcuts were changed to 
Qt::WidgetWithChildrenShortcut. But i can't figure out why? The description 
states clearly that it only prevents a shortcut to be valid over the 
boundaries of top level widgets. In kate i can't see where top level widgets 
should be involved. Because i see the term top level widget in the qt 
documentation but no explanation i can only guess what a top level widgets is. 
widgets with th either dialog, window or popup type. Some others from 
Qt::WindowFlags are not valid for the case here.  It's explicitly stated that 
popups don't count as top level widgets for the shortcut context so we are 
left with two. But none of them apply here.

The kate konsole is just a widget because kparts are just widgets and a child 
of the mainwindow. So setting this shortcut context should makes no 
difference. For the fun of it go to kateconsole.cpp line 181 and insert  
m_part->widget()->setWindowFlags( Qt::Window ); . The konsole will be a 
standalone window and the shortcut work as expected.

I'm pretty sure this is not solvable with some Qt Flags.

Mike

-- 
Michael Jansen
Available for contract work ( Development / Configuration Management )
http://www.michael-jansen.biz




More information about the kde-core-devel mailing list