[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Jun 6 10:15:38 UTC 2005


SVN commit 422845 by okellogg:

Use QToolButton instead of KToolBarButton for m_closeDiagramButton.
Thanks to David Cuadrado <krawek_AT_gmail.com> for the fix.
BUG:103170


 M  +1 -1      ChangeLog  
 M  +8 -3      umbrello/uml.cpp  
 M  +8 -3      umbrello/uml.h  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #422844:422845
@@ -10,7 +10,7 @@
 Version 1.4.2 (maintenance release)
 
 * Bugs fixed from http://bugs.kde.org :
-106632 106673
+103170 106632 106673
 
 Version 1.4.1 (maintenance release)
 
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #422844:422845
@@ -22,6 +22,7 @@
 #include <qwidgetstack.h>
 #include <qslider.h>
 #include <qregexp.h>
+#include <qtoolbutton.h>
 
 // kde includes
 #include <kaction.h>
@@ -407,6 +408,9 @@
 
 	m_mainDock = createDockWidget("maindock", 0L, 0L, "main dock");
 #if KDE_IS_VERSION(3,1,90)
+	m_newSessionButton = NULL;
+	m_diagramMenu = NULL;
+	m_closeDiagramButton = NULL;
 	if (m_optionState.generalState.tabdiagrams) {
 		m_viewStack = NULL;
 		m_tabWidget = new KTabWidget(m_mainDock, "tab_widget");
@@ -415,11 +419,11 @@
 		m_tabWidget->setAutomaticResizeTabs( true );
 #endif
 
-		KToolBarButton* m_newSessionButton = new KToolBarButton("tab_new", 0, m_tabWidget);
+		m_newSessionButton = new KToolBarButton("tab_new", 0, m_tabWidget);
 		m_newSessionButton->setIconSet( SmallIcon( "tab_new" ) );
 		m_newSessionButton->adjustSize();
 		m_newSessionButton->setAutoRaise(true);
-		KPopupMenu* m_diagramMenu = new KPopupMenu(m_newSessionButton);
+		m_diagramMenu = new KPopupMenu(m_newSessionButton);
 
 		m_diagramMenu->insertItem(Umbrello::iconSet(Uml::dt_Class), i18n("Class Diagram..."), this, SLOT(slotClassDiagram()) );
 		m_diagramMenu->insertItem(Umbrello::iconSet(Uml::dt_Sequence), i18n("Sequence Diagram..."), this, SLOT(slotSequenceDiagram()) );
@@ -434,7 +438,8 @@
 		//FIXME why doesn't this work?
 		//m_newSessionButton->setPopup(newDiagram->popupMenu());
 
-		KToolBarButton* m_closeDiagramButton = new KToolBarButton("tab_remove", 0, m_tabWidget);
+		//m_closeDiagramButton = new KToolBarButton("tab_remove", 0, m_tabWidget);
+		m_closeDiagramButton = new QToolButton(m_tabWidget);
 		m_closeDiagramButton->setIconSet( SmallIcon("tab_remove") );
 		m_closeDiagramButton->adjustSize();
 
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.h #422844:422845
@@ -54,11 +54,14 @@
 class KToggleAction;
 class KDockWidget;
 class KTabWidget;
+class KToolBarButton;
+class KPopupMenu;
 
 // Qt forward declarations
 class QWidgetStack;
 class QMenuData;
 class QClipboard;
+class QToolButton;
 
 class RefactoringAssistant;
 
@@ -880,11 +883,13 @@
 	KAction* changeTabRight;
 	KAction* moveTabLeft;
 	KAction* moveTabRight;
-//Remove these once we stop supporting KDE 3.1
-// #if !KDE_IS_VERSION(3,1,90)
+#if KDE_IS_VERSION(3,1,90)
+	KToolBarButton* m_newSessionButton;
+	KPopupMenu* m_diagramMenu;
+	QToolButton* m_closeDiagramButton;
+#endif
 	KToggleAction* viewToolBar;
 	KToggleAction* viewStatusBar;
-// #endif
 	WorkToolBar* toolsbar;
 	QTimer* m_clipTimer;
 	QTimer* m_copyTimer;




More information about the umbrello-devel mailing list