actions are not plugged in warning

Hamish Rodda rodda at kde.org
Mon May 22 21:59:49 BST 2006


On Tuesday 23 May 2006 04:55, Boudewijn Rempt wrote:
> Since ver recently, I get:
>
> krita: WARNING: [void KXMLGUIFactory::addClient(KXMLGUIClient*)] The
> following actions are not plugged into the gui (shortcuts will not work):
> edit_undo edit_redo file_versions_file resize_panel_forward
> resize_panel_reverse access_keys view_closeallviews view_split
> view_rm_splitter
> view_splitter_orientation  selectionScale
> krita: WARNING: [void KXMLGUIFactory::addClient(KXMLGUIClient*)] The
> following actions are not plugged into the gui (shortcuts will not work):
> edit_undo edit_redo file_versions_file resize_panel_forward
> resize_panel_reverse access_keys view_closeallviews view_split
> view_rm_splitter
> view_splitter_orientation  screenshot imagesize layersize selectionScale
> histogram perf_test wetnessvisualisation krita_filters_gallery colorrange
> growselection shrinkselection borderselection shearimage shearlayer
> rotateimage rotateImageCW90 rotateImage180 rotateImageCCW90 rotatelayer
> rotateLayer180 rotateLayerCCW90 rotateLayerCW90 separate
> imgcolorspaceconversion layercolorspaceconversion
>
> in krita 2.0. What do I need to do to fix this? And to gratify my
> curiosity, why?

In KDE < 4, KAction registered its shortcuts with KAccel, and regardless of 
whether the action was plug()ed into a widget or not, shortcuts would work.

With KDE >= 4, KAction is now a QAction, and shortcuts are registered 
internally to Qt.  However, this only happens if the action has been add()ed 
to a widget.  Some subtle bugs have cropped up because of this and I wanted 
to notify developers that this is the case.

However, the check is not perfect yet; firstly I think it is in the wrong spot 
(should perhaps be in KMainWindow::finalizeGUI()) and secondly it doesn't 
ignore inactive parts.

> What I currently do, for instance for rotateImageCCW90 in my KParts::Plugin
> subclass is:
>
> action = new KAction(KIcon("rotate_cw"), i18n("Rotate Image CW"),
> 		actionCollection(), "rotateImageCW90");
>
> Do I need to more nowadays?

You either need to have rotateImageCW90 added to the gui via your 
application's .rc file, or add it to any widget (those which don't create a 
representation for the action are fine too).

I may consider automating this process though KActionCollection, as it will 
probably turn out to be hard to catch when an action has been removed from 
all widgets.

I'm also considering filing a bug with Qt about this, because I don't really 
think this sort of workaround should be required for actions with Window and 
Application level shortcut contexts.

Cheers,
Hamish.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060523/f428b8f9/attachment.sig>


More information about the kde-core-devel mailing list