summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/ktoolbarhandler.cpp
Unidiff
Diffstat (limited to 'microkde/kdeui/ktoolbarhandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/ktoolbarhandler.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/microkde/kdeui/ktoolbarhandler.cpp b/microkde/kdeui/ktoolbarhandler.cpp
index 7b97233..4d3ace7 100644
--- a/microkde/kdeui/ktoolbarhandler.cpp
+++ b/microkde/kdeui/ktoolbarhandler.cpp
@@ -18,7 +18,9 @@
18 18
19#include "ktoolbarhandler.h" 19#include "ktoolbarhandler.h"
20 20
21#include <qpopupmenu.h> 21#include <q3popupmenu.h>
22//Added by qt3to4:
23#include <Q3PtrList>
22#include <kapplication.h> 24#include <kapplication.h>
23#include <ktoolbar.h> 25#include <ktoolbar.h>
24#include <kmainwindow.h> 26#include <kmainwindow.h>
@@ -44,7 +46,7 @@ namespace
44 class BarActionBuilder 46 class BarActionBuilder
45 { 47 {
46 public: 48 public:
47 BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList ) 49 BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, Q3PtrList<KToolBar> &oldToolBarList )
48 : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) 50 : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
49 { 51 {
50/*US 52/*US
@@ -70,16 +72,16 @@ namespace
70 72
71 bool needsRebuild() const { return m_needsRebuild; } 73 bool needsRebuild() const { return m_needsRebuild; }
72 74
73 QPtrList<KAction> create() 75 Q3PtrList<KAction> create()
74 { 76 {
75 if ( !m_needsRebuild ) 77 if ( !m_needsRebuild )
76 return QPtrList<KAction>(); 78 return Q3PtrList<KAction>();
77 79
78 QPtrListIterator<KToolBar> toolBarIt( m_toolBars ); 80 Q3PtrListIterator<KToolBar> toolBarIt( m_toolBars );
79 for ( ; toolBarIt.current(); ++toolBarIt ) 81 for ( ; toolBarIt.current(); ++toolBarIt )
80 handleToolBar( toolBarIt.current() ); 82 handleToolBar( toolBarIt.current() );
81 83
82 QPtrList<KAction> actions; 84 Q3PtrList<KAction> actions;
83 85
84 if ( m_toolBarActions.count() == 0 ) 86 if ( m_toolBarActions.count() == 0 )
85 return actions; 87 return actions;
@@ -91,7 +93,7 @@ namespace
91 93
92 KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); 94 KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" );
93 95
94 QPtrListIterator<KAction> actionIt( m_toolBarActions ); 96 Q3PtrListIterator<KAction> actionIt( m_toolBarActions );
95 for ( ; actionIt.current(); ++actionIt ) 97 for ( ; actionIt.current(); ++actionIt )
96 menuAction->insert( actionIt.current() ); 98 menuAction->insert( actionIt.current() );
97 99
@@ -99,7 +101,7 @@ namespace
99 return actions; 101 return actions;
100 } 102 }
101 103
102 const QPtrList<KToolBar> &toolBars() const { return m_toolBars; } 104 const Q3PtrList<KToolBar> &toolBars() const { return m_toolBars; }
103 105
104 private: 106 private:
105 void handleToolBar( KToolBar *toolBar ) 107 void handleToolBar( KToolBar *toolBar )
@@ -115,8 +117,8 @@ namespace
115 KActionCollection *m_actionCollection; 117 KActionCollection *m_actionCollection;
116 KMainWindow *m_mainWindow; 118 KMainWindow *m_mainWindow;
117 119
118 QPtrList<KToolBar> m_toolBars; 120 Q3PtrList<KToolBar> m_toolBars;
119 QPtrList<KAction> m_toolBarActions; 121 Q3PtrList<KAction> m_toolBarActions;
120 122
121 bool m_needsRebuild : 1; 123 bool m_needsRebuild : 1;
122 }; 124 };
@@ -224,7 +226,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
224 226
225void ToolBarHandler::connectToActionContainers() 227void ToolBarHandler::connectToActionContainers()
226{ 228{
227 QPtrListIterator<KAction> actionIt( m_actions ); 229 Q3PtrListIterator<KAction> actionIt( m_actions );
228 for ( ; actionIt.current(); ++actionIt ) 230 for ( ; actionIt.current(); ++actionIt )
229 connectToActionContainer( actionIt.current() ); 231 connectToActionContainer( actionIt.current() );
230} 232}
@@ -239,7 +241,7 @@ void ToolBarHandler::connectToActionContainer( KAction *action )
239void ToolBarHandler::connectToActionContainer( QWidget *container ) 241void ToolBarHandler::connectToActionContainer( QWidget *container )
240{ 242{
241//US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container ); 243//US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container );
242 QPopupMenu *popupMenu = (QPopupMenu *)( container ); 244 Q3PopupMenu *popupMenu = (Q3PopupMenu *)( container );
243 if ( !popupMenu ) 245 if ( !popupMenu )
244 return; 246 return;
245 247