Problem with KAction::updateIcon{,Set} ?

Ben Burton bab at debian.org
Thu Dec 12 13:54:47 GMT 2002


Hi.  The problem I'm experiencing is as follows.

Create a KPart that provides actions with their own icons, i.e., icons in 
.../apps/foopart/icons/, not in the global icon dirs.

Look at the menu item for an action, and then configure the toolbars (with a 
standard KEditToolbar dialog).  Everything is peachy.

Restart the application.  Configure the toolbars *without* first looking at 
the menu item.  Then the actions in question for the part have blank icons in 
the KEditToolbar dialog.  But furthermore, if you look at the menu item 
*after* that, the icons are still blank, i.e., the correct icons seem to 
never get loaded.

I had a rummage through the kdelibs sources to see why this might be 
happening; my best guess is that KAction::updateIcon() and 
KAction::updateIconSet() call KGUIItem::iconSet() without providing an 
instance (thus defaulting to KGlobal::instance() which won't work for the 
KPart AFAICT).  I'm guessing that these routines need extra code to pass the 
correct instance, as is done in KAction::plug(), though it's entirely 
possible I have no idea what I'm talking about.

Using CVS BRANCH from about a week ago.

Is this a bug or am I just misunderstanding things?

Thanks - Ben. :)

-- 

Ben Burton
bab at debian.org
Public Key: finger bab at db.debian.org

Mr Deputy Speaker, am I to be continually abused by the Honorable Member for
Mitchell and the drone beside him, the Honorable Member for Braddon ?
	- Paul Keating






More information about the kde-core-devel mailing list