[PATCH] Using iconSet instead of icon names in KToolBarPopupAction

Tobias Koenig tokoe at kde.org
Fri Nov 21 16:53:03 GMT 2003


Hi,

like already mentioned above the attached patch uses the iconSet of
the KToolBarPopupAction instead of the icon name to insert a button
into the toolbar. That's necessary since KToolBarPopupAction won't find
the correct icons when you plug actions from several KInstances into the
popup menu.
This patch fixes http://bugs.kde.org/show_bug.cgi?id=67450 btw.

Ciao,
Tobias
-- 
Can a government that shoots at reporters be democratic?
Separate politics from religion and economy!
-------------- next part --------------
Index: kactionclasses.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kactionclasses.cpp,v
retrieving revision 1.331
diff -p -u -b -r1.331 kactionclasses.cpp
--- kactionclasses.cpp	17 Nov 2003 16:08:38 -0000	1.331
+++ kactionclasses.cpp	21 Nov 2003 16:46:53 -0000
@@ -1811,15 +1811,9 @@ int KToolBarPopupAction::plug( QWidget *
 
     int id_ = KAction::getToolButtonID();
 
-    KInstance * instance;
-    if ( m_parentCollection )
-        instance = m_parentCollection->instance();
-    else
-        instance = KGlobal::instance();
-
-    bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
+    bar->insertButton( iconSet().pixmap(), id_, SIGNAL( clicked() ), this,
                        SLOT( slotActivated() ), isEnabled(), plainText(),
-                       index, instance );
+                       index );
 
     addContainer( bar, id_ );
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031121/2b39ce9e/attachment.sig>


More information about the kde-core-devel mailing list