summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kaction.cpp
Unidiff
Diffstat (limited to 'microkde/kdeui/kaction.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/kaction.cpp75
1 files changed, 39 insertions, 36 deletions
diff --git a/microkde/kdeui/kaction.cpp b/microkde/kdeui/kaction.cpp
index d38a6d5..c2df381 100644
--- a/microkde/kdeui/kaction.cpp
+++ b/microkde/kdeui/kaction.cpp
@@ -25,12 +25,15 @@
25 25
26#include "kaction.h" 26#include "kaction.h"
27 27
28#include <assert.h> 28#include <assert.h>
29 29
30#include <qtooltip.h> 30#include <qtooltip.h>
31//Added by qt3to4:
32#include <Q3CString>
33#include <Q3ValueList>
31//US#include <qwhatsthis.h> 34//US#include <qwhatsthis.h>
32//US#include <kaccel.h> 35//US#include <kaccel.h>
33//US#include <kaccelbase.h> 36//US#include <kaccelbase.h>
34#include <kapplication.h> 37#include <kapplication.h>
35#include <kdebug.h> 38#include <kdebug.h>
36#include <kguiitem.h> 39#include <kguiitem.h>
@@ -39,15 +42,15 @@
39//US#include <kpopupmenu.h> 42//US#include <kpopupmenu.h>
40#include <ktoolbar.h> 43#include <ktoolbar.h>
41#include <ktoolbarbutton.h> 44#include <ktoolbarbutton.h>
42 45
43//US added this includefiles 46//US added this includefiles
44#include <qmenubar.h> 47#include <qmenubar.h>
45#include <qtoolbar.h> 48#include <q3toolbar.h>
46#include <qpopupmenu.h> 49#include <q3popupmenu.h>
47#include <qiconset.h> 50#include <qicon.h>
48 51
49/** 52/**
50* How it works. 53* How it works.
51* KActionCollection is an organizing container for KActions. 54* KActionCollection is an organizing container for KActions.
52* KActionCollection keeps track of the information necessary to handle 55* KActionCollection keeps track of the information necessary to handle
53* configuration and shortcuts. 56* configuration and shortcuts.
@@ -84,13 +87,13 @@ public:
84 { 87 {
85 m_kaccel = 0; 88 m_kaccel = 0;
86 m_configurable = true; 89 m_configurable = true;
87 } 90 }
88 91
89 KAccel *m_kaccel; 92 KAccel *m_kaccel;
90 QValueList<KAccel*> m_kaccelList; 93 Q3ValueList<KAccel*> m_kaccelList;
91 94
92 QString m_groupText; 95 QString m_groupText;
93 QString m_group; 96 QString m_group;
94 97
95 KShortcut m_cut; 98 KShortcut m_cut;
96 KShortcut m_cutDefault; 99 KShortcut m_cutDefault;
@@ -104,13 +107,13 @@ public:
104 m_id = s.m_id; m_representative = s.m_representative; } 107 m_id = s.m_id; m_representative = s.m_representative; }
105 QWidget* m_container; 108 QWidget* m_container;
106 int m_id; 109 int m_id;
107 QWidget* m_representative; 110 QWidget* m_representative;
108 }; 111 };
109 112
110 QValueList<Container> m_containers; 113 Q3ValueList<Container> m_containers;
111}; 114};
112 115
113//--------------------------------------------------------------------- 116//---------------------------------------------------------------------
114// KAction 117// KAction
115//--------------------------------------------------------------------- 118//---------------------------------------------------------------------
116KAction::KAction( const QString& text, const KShortcut& cut, 119KAction::KAction( const QString& text, const KShortcut& cut,
@@ -127,13 +130,13 @@ KAction::KAction( const QString& text, const QString& sIconName, const KShortcut
127: QObject( parent, name ) 130: QObject( parent, name )
128{ 131{
129 initPrivate( text, cut, receiver, slot ); 132 initPrivate( text, cut, receiver, slot );
130 d->setIconName( sIconName ); 133 d->setIconName( sIconName );
131} 134}
132 135
133KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 136KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
134 const QObject* receiver, const char* slot, 137 const QObject* receiver, const char* slot,
135 KActionCollection* parent, const char* name ) 138 KActionCollection* parent, const char* name )
136: QObject( parent, name ) 139: QObject( parent, name )
137{ 140{
138 initPrivate( text, cut, receiver, slot ); 141 initPrivate( text, cut, receiver, slot );
139 d->setIconSet( pix ); 142 d->setIconSet( pix );
@@ -161,13 +164,13 @@ KAction::KAction( const QString& text, const KShortcut& cut,
161 const QObject* receiver, 164 const QObject* receiver,
162 const char* slot, QObject* parent, const char* name ) 165 const char* slot, QObject* parent, const char* name )
163 : QObject( parent, name ) 166 : QObject( parent, name )
164{ 167{
165 initPrivate( text, cut, receiver, slot ); 168 initPrivate( text, cut, receiver, slot );
166} 169}
167KAction::KAction( const QString& text, const QIconSet& pix, 170KAction::KAction( const QString& text, const QIcon& pix,
168 const KShortcut& cut, 171 const KShortcut& cut,
169 QObject* parent, const char* name ) 172 QObject* parent, const char* name )
170 : QObject( parent, name ) 173 : QObject( parent, name )
171{ 174{
172 initPrivate( text, cut, 0, 0 ); 175 initPrivate( text, cut, 0, 0 );
173 setIconSet( pix ); 176 setIconSet( pix );
@@ -179,13 +182,13 @@ KAction::KAction( const QString& text, const QString& pix,
179: QObject( parent, name ) 182: QObject( parent, name )
180{ 183{
181 initPrivate( text, cut, 0, 0 ); 184 initPrivate( text, cut, 0, 0 );
182 d->setIconName( pix ); 185 d->setIconName( pix );
183} 186}
184 187
185KAction::KAction( const QString& text, const QIconSet& pix, 188KAction::KAction( const QString& text, const QIcon& pix,
186 const KShortcut& cut, 189 const KShortcut& cut,
187 const QObject* receiver, const char* slot, QObject* parent, 190 const QObject* receiver, const char* slot, QObject* parent,
188 const char* name ) 191 const char* name )
189 : QObject( parent, name ) 192 : QObject( parent, name )
190{ 193{
191 initPrivate( text, cut, receiver, slot ); 194 initPrivate( text, cut, receiver, slot );
@@ -503,25 +506,25 @@ void KAction::setAccel( int keyQt )
503 506
504void KAction::updateShortcut( int i ) 507void KAction::updateShortcut( int i )
505{ 508{
506 int id = itemId( i ); 509 int id = itemId( i );
507 510
508 QWidget* w = container( i ); 511 QWidget* w = container( i );
509 if ( w->inherits( "QPopupMenu" ) ) { 512 if ( w->inherits( "Q3PopupMenu" ) ) {
510 QPopupMenu* menu = static_cast<QPopupMenu*>(w); 513 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>(w);
511 updateShortcut( menu, id ); 514 updateShortcut( menu, id );
512 } 515 }
513 else if ( w->inherits( "QMenuBar" ) ) 516 else if ( w->inherits( "QMenuBar" ) )
514//US static_cast<QMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id ); 517//US static_cast<QMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id );
515//US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id ); 518//US (QMenuBar*)(w)->setAccel( d->m_cut.keyCodeQt(), id );
516 519
517 ; //qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed"); 520 ; //qDebug("KAction::updateShortcut( int i ) ...1 has top be fixed");
518 521
519} 522}
520 523
521void KAction::updateShortcut( QPopupMenu* menu, int id ) 524void KAction::updateShortcut( Q3PopupMenu* menu, int id )
522{ 525{
523/*US 526/*US
524 //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; 527 //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl;
525 // If the action has a KAccel object, 528 // If the action has a KAccel object,
526 // show the string representation of its shortcut. 529 // show the string representation of its shortcut.
527 if ( d->m_kaccel || d->m_kaccelList.count() ) { 530 if ( d->m_kaccel || d->m_kaccelList.count() ) {
@@ -618,13 +621,13 @@ void KAction::updateToolTip( int i )
618{ 621{
619 //qDebug("KAction::updateToolTip ...1 has top be fixed"); 622 //qDebug("KAction::updateToolTip ...1 has top be fixed");
620 QWidget *w = container( i ); 623 QWidget *w = container( i );
621 624
622 if ( w->inherits( "KToolBar" ) ) 625 if ( w->inherits( "KToolBar" ) )
623 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); 626 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
624 else if ( w->inherits( "QToolBar" ) ) 627 else if ( w->inherits( "Q3ToolBar" ) )
625 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); 628 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
626} 629}
627 630
628QString KAction::toolTip() const 631QString KAction::toolTip() const
629{ 632{
630 return d->toolTip(); 633 return d->toolTip();
@@ -643,15 +646,15 @@ int KAction::plug( QWidget *w, int index )
643 // Check if action is permitted 646 // Check if action is permitted
644//US if (kapp && !kapp->authorizeKAction(name())) 647//US if (kapp && !kapp->authorizeKAction(name()))
645//US return -1; 648//US return -1;
646 649
647 plugShortcut(); 650 plugShortcut();
648 651
649 if ( w->inherits("QPopupMenu") ) 652 if ( w->inherits("Q3PopupMenu") )
650 { 653 {
651 QPopupMenu* menu = static_cast<QPopupMenu*>( w ); 654 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( w );
652 int id; 655 int id;
653 // Don't insert shortcut into menu if it's already in a KAccel object. 656 // Don't insert shortcut into menu if it's already in a KAccel object.
654 //qDebug("KAction::plug warning: real shortcuts not available yet. "); 657 //qDebug("KAction::plug warning: real shortcuts not available yet. ");
655//US int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt(); 658//US int keyQt = (d->m_kaccelList.count() || d->m_kaccel) ? 0 : d->m_cut.keyCodeQt();
656 int keyQt = 0; 659 int keyQt = 0;
657 660
@@ -718,13 +721,13 @@ int KAction::plug( QWidget *w, int index )
718 if ( icon.isEmpty() ) 721 if ( icon.isEmpty() )
719 icon = "unknown"; 722 icon = "unknown";
720 bar->insertButton( icon, id_, SIGNAL( clicked() ), this, 723 bar->insertButton( icon, id_, SIGNAL( clicked() ), this,
721 SLOT( slotActivated() ), 724 SLOT( slotActivated() ),
722 d->isEnabled(), d->plainText(), index/*US, instance*/ ); 725 d->isEnabled(), d->plainText(), index/*US, instance*/ );
723 } 726 }
724 bar->getButton( id_ )->setName( QCString("toolbutton_")+name() ); 727 bar->getButton( id_ )->setName( Q3CString("toolbutton_")+name() );
725 728
726//US if ( !d->whatsThis().isEmpty() ) 729//US if ( !d->whatsThis().isEmpty() )
727//US QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() ); 730//US QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
728 if ( !d->toolTip().isEmpty() ) 731 if ( !d->toolTip().isEmpty() )
729 QToolTip::add( bar->getButton(id_), d->toolTip() ); 732 QToolTip::add( bar->getButton(id_), d->toolTip() );
730 733
@@ -746,15 +749,15 @@ void KAction::unplug( QWidget *w )
746{ 749{
747 int i = findContainer( w ); 750 int i = findContainer( w );
748 if ( i == -1 ) 751 if ( i == -1 )
749 return; 752 return;
750 int id = itemId( i ); 753 int id = itemId( i );
751 754
752 if ( w->inherits( "QPopupMenu" ) ) 755 if ( w->inherits( "Q3PopupMenu" ) )
753 { 756 {
754 QPopupMenu *menu = static_cast<QPopupMenu *>( w ); 757 Q3PopupMenu *menu = static_cast<Q3PopupMenu *>( w );
755 menu->removeItem( id ); 758 menu->removeItem( id );
756 } 759 }
757 else if ( w->inherits( "KToolBar" ) ) 760 else if ( w->inherits( "KToolBar" ) )
758 { 761 {
759 KToolBar *bar = static_cast<KToolBar *>( w ); 762 KToolBar *bar = static_cast<KToolBar *>( w );
760 bar->removeItemDelayed( id ); 763 bar->removeItemDelayed( id );
@@ -859,14 +862,14 @@ void KAction::setEnabled(bool enable)
859} 862}
860 863
861void KAction::updateEnabled( int i ) 864void KAction::updateEnabled( int i )
862{ 865{
863 QWidget *w = container( i ); 866 QWidget *w = container( i );
864 867
865 if ( w->inherits("QPopupMenu") ) 868 if ( w->inherits("Q3PopupMenu") )
866 static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); 869 static_cast<Q3PopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
867 else if ( w->inherits("QMenuBar") ) 870 else if ( w->inherits("QMenuBar") )
868 static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); 871 static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
869 else if ( w->inherits( "KToolBar" ) ) 872 else if ( w->inherits( "KToolBar" ) )
870 { 873 {
871 static_cast<KToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); 874 static_cast<KToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
872 } 875 }
@@ -903,16 +906,16 @@ void KAction::setText( const QString& text )
903} 906}
904 907
905void KAction::updateText( int i ) 908void KAction::updateText( int i )
906{ 909{
907 QWidget *w = container( i ); 910 QWidget *w = container( i );
908 911
909 if ( w->inherits( "QPopupMenu" ) ) { 912 if ( w->inherits( "Q3PopupMenu" ) ) {
910 int id = itemId( i ); 913 int id = itemId( i );
911 static_cast<QPopupMenu*>(w)->changeItem( id, d->text() ); 914 static_cast<Q3PopupMenu*>(w)->changeItem( id, d->text() );
912 updateShortcut( static_cast<QPopupMenu*>(w), id ); 915 updateShortcut( static_cast<Q3PopupMenu*>(w), id );
913 } 916 }
914 else if ( w->inherits( "QMenuBar" ) ) 917 else if ( w->inherits( "QMenuBar" ) )
915 static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() ); 918 static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() );
916 else if ( w->inherits( "KToolBar" ) ) 919 else if ( w->inherits( "KToolBar" ) )
917 { 920 {
918 //qDebug("KAction::updateText ...3 has top be fixed"); 921 //qDebug("KAction::updateText ...3 has top be fixed");
@@ -944,34 +947,34 @@ void KAction::setIcon( const QString &icon )
944} 947}
945 948
946void KAction::updateIcon( int id ) 949void KAction::updateIcon( int id )
947{ 950{
948 QWidget* w = container( id ); 951 QWidget* w = container( id );
949 952
950 if ( w->inherits( "QPopupMenu" ) ) { 953 if ( w->inherits( "Q3PopupMenu" ) ) {
951 int itemId_ = itemId( id ); 954 int itemId_ = itemId( id );
952 static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() ); 955 static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
953 updateShortcut( static_cast<QPopupMenu*>(w), itemId_ ); 956 updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
954 } 957 }
955 else if ( w->inherits( "QMenuBar" ) ) 958 else if ( w->inherits( "QMenuBar" ) )
956 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); 959 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() );
957 else if ( w->inherits( "KToolBar" ) ) 960 else if ( w->inherits( "KToolBar" ) )
958 static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); 961 static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
959 else if ( w->inherits( "QToolBar" ) ) 962 else if ( w->inherits( "Q3ToolBar" ) )
960 { 963 {
961 qDebug("KAction::updateIcon has top be fixed"); 964 qDebug("KAction::updateIcon has top be fixed");
962//US static_cast<QToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); 965//US static_cast<QToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
963 } 966 }
964} 967}
965 968
966QString KAction::icon() const 969QString KAction::icon() const
967{ 970{
968 return d->iconName( ); 971 return d->iconName( );
969} 972}
970 973
971void KAction::setIconSet( const QIconSet &iconset ) 974void KAction::setIconSet( const QIcon &iconset )
972{ 975{
973 d->setIconSet( iconset ); 976 d->setIconSet( iconset );
974 977
975 int len = containerCount(); 978 int len = containerCount();
976 for( int i = 0; i < len; ++i ) 979 for( int i = 0; i < len; ++i )
977 updateIconSet( i ); 980 updateIconSet( i );
@@ -979,30 +982,30 @@ void KAction::setIconSet( const QIconSet &iconset )
979 982
980 983
981void KAction::updateIconSet( int id ) 984void KAction::updateIconSet( int id )
982{ 985{
983 QWidget *w = container( id ); 986 QWidget *w = container( id );
984 987
985 if ( w->inherits( "QPopupMenu" ) ) 988 if ( w->inherits( "Q3PopupMenu" ) )
986 { 989 {
987 int itemId_ = itemId( id ); 990 int itemId_ = itemId( id );
988 static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() ); 991 static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
989 updateShortcut( static_cast<QPopupMenu*>(w), itemId_ ); 992 updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
990 } 993 }
991 else if ( w->inherits( "QMenuBar" ) ) 994 else if ( w->inherits( "QMenuBar" ) )
992 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); 995 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
993 else if ( w->inherits( "KToolBar" ) ) 996 else if ( w->inherits( "KToolBar" ) )
994 { 997 {
995 if ( icon().isEmpty() && d->hasIconSet() ) // only if there is no named icon ( scales better ) 998 if ( icon().isEmpty() && d->hasIconSet() ) // only if there is no named icon ( scales better )
996 static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); 999 static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() );
997 else 1000 else
998 static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); 1001 static_cast<KToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) );
999 } 1002 }
1000} 1003}
1001 1004
1002QIconSet KAction::iconSet( KIcon::Group group, int size ) const 1005QIcon KAction::iconSet( KIcon::Group group, int size ) const
1003{ 1006{
1004 return d->iconSet( group, size ); 1007 return d->iconSet( group, size );
1005} 1008}
1006 1009
1007bool KAction::hasIcon() const 1010bool KAction::hasIcon() const
1008{ 1011{
@@ -1019,13 +1022,13 @@ void KAction::setWhatsThis( const QString& text )
1019 updateWhatsThis( i ); 1022 updateWhatsThis( i );
1020} 1023}
1021 1024
1022void KAction::updateWhatsThis( int i ) 1025void KAction::updateWhatsThis( int i )
1023{ 1026{
1024 qDebug("KAction::updateWhatsThis ...1 has top be fixed"); 1027 qDebug("KAction::updateWhatsThis ...1 has top be fixed");
1025 QPopupMenu* pm = popupMenu( i ); 1028 Q3PopupMenu* pm = popupMenu( i );
1026 if ( pm ) 1029 if ( pm )
1027 { 1030 {
1028 pm->setWhatsThis( itemId( i ), d->whatsThis() ); 1031 pm->setWhatsThis( itemId( i ), d->whatsThis() );
1029 return; 1032 return;
1030 } 1033 }
1031 1034
@@ -1061,16 +1064,16 @@ QWidget* KAction::container( int index ) const
1061KToolBar* KAction::toolBar( int index ) const 1064KToolBar* KAction::toolBar( int index ) const
1062{ 1065{
1063//US return dynamic_cast<KToolBar *>( d->m_containers[ index ].m_container ); 1066//US return dynamic_cast<KToolBar *>( d->m_containers[ index ].m_container );
1064 return (KToolBar *)( d->m_containers[ index ].m_container ); 1067 return (KToolBar *)( d->m_containers[ index ].m_container );
1065} 1068}
1066 1069
1067QPopupMenu* KAction::popupMenu( int index ) const 1070Q3PopupMenu* KAction::popupMenu( int index ) const
1068{ 1071{
1069//US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container ); 1072//US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container );
1070 return (QPopupMenu *)( d->m_containers[ index ].m_container ); 1073 return (Q3PopupMenu *)( d->m_containers[ index ].m_container );
1071} 1074}
1072 1075
1073QWidget* KAction::representative( int index ) const 1076QWidget* KAction::representative( int index ) const
1074{ 1077{
1075 return d->m_containers[ index ].m_representative; 1078 return d->m_containers[ index ].m_representative;
1076} 1079}
@@ -1152,13 +1155,13 @@ void KAction::slotDestroyed()
1152 1155
1153} 1156}
1154 1157
1155int KAction::findContainer( const QWidget* widget ) const 1158int KAction::findContainer( const QWidget* widget ) const
1156{ 1159{
1157 int pos = 0; 1160 int pos = 0;
1158 QValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin(); 1161 Q3ValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin();
1159 while( it != d->m_containers.end() ) 1162 while( it != d->m_containers.end() )
1160 { 1163 {
1161 if ( (*it).m_representative == widget || (*it).m_container == widget ) 1164 if ( (*it).m_representative == widget || (*it).m_container == widget )
1162 return pos; 1165 return pos;
1163 ++it; 1166 ++it;
1164 ++pos; 1167 ++pos;
@@ -1167,13 +1170,13 @@ int KAction::findContainer( const QWidget* widget ) const
1167 return -1; 1170 return -1;
1168} 1171}
1169 1172
1170void KAction::removeContainer( int index ) 1173void KAction::removeContainer( int index )
1171{ 1174{
1172 int i = 0; 1175 int i = 0;
1173 QValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin(); 1176 Q3ValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin();
1174 while( it != d->m_containers.end() ) 1177 while( it != d->m_containers.end() )
1175 { 1178 {
1176 if ( i == index ) 1179 if ( i == index )
1177 { 1180 {
1178 d->m_containers.remove( it ); 1181 d->m_containers.remove( it );
1179 return; 1182 return;