[Uml-devel] KDE/kdesdk/umbrello/umbrello/dialogs

Andi Fischer andi.fischer at hispeed.ch
Sat May 31 08:45:01 UTC 2008


SVN commit 814714 by fischer:

Kryzy Code Checker: changing QTextEdit to KTextEdit and QTabWidget to KTabWidget.

 M  +29 -23    classifierlistpage.cpp  
 M  +7 -6      classifierlistpage.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classifierlistpage.cpp #814713:814714
@@ -11,22 +11,24 @@
 
 #include "classifierlistpage.h"
 
+#include <QtGui/QApplication>
+
 #include <kdebug.h>
 #include <kdialogbuttonbox.h>
 #include <klocale.h>
-#include <QtGui/QApplication>
+#include <ktabwidget.h>
 
-#include "../classifierlistitem.h"
-#include "../umldoc.h"
-#include "../classifier.h"
-#include "../enum.h"
-#include "../entity.h"
-#include "../attribute.h"
-#include "../operation.h"
-#include "../template.h"
-#include "../enumliteral.h"
-#include "../entityattribute.h"
-#include "../object_factory.h"
+#include "classifierlistitem.h"
+#include "umldoc.h"
+#include "classifier.h"
+#include "enum.h"
+#include "entity.h"
+#include "attribute.h"
+#include "operation.h"
+#include "template.h"
+#include "enumliteral.h"
+#include "entityattribute.h"
+#include "object_factory.h"
 
 
 using namespace Uml;
@@ -173,15 +175,15 @@
     docLayout->setSpacing(10);
     docLayout->setMargin(margin);
     if (m_itemType == ot_Operation) {
-        m_pDocTE = new QTextEdit();
-        m_pCodeTE = new QTextEdit();
-        QTabWidget* tabWidget = new QTabWidget();
+        m_pDocTE = new KTextEdit();
+        m_pCodeTE = new KTextEdit();
+        KTabWidget* tabWidget = new KTabWidget();
         tabWidget->addTab(m_pDocTE, i18n("Comment"));
         tabWidget->addTab(m_pCodeTE, i18n("Source Code"));
         docLayout->addWidget(tabWidget);
     }
     else {
-        m_pDocTE = new QTextEdit();
+        m_pDocTE = new KTextEdit();
         docLayout->addWidget(m_pDocTE);
     }
 }
@@ -232,7 +234,7 @@
         If at bottom item, only allow up arrow to be enabled.
     */
     int index = m_pItemListLB->currentRow();
-    if( m_pItemListLB->count() == 1 || index == -1 ) {
+    if ( m_pItemListLB->count() == 1 || index == -1 ) {
         m_pTopArrowB->setEnabled( false );
         m_pUpArrowB->setEnabled( false );
         m_pDownArrowB->setEnabled( false );
@@ -586,8 +588,9 @@
 
 void ClassifierListPage::slotDoubleClick( QListWidgetItem* item )
 {
-    if ( !item )
+    if ( !item ) {
         return;
+    }
 
     UMLClassifierListItem* listItem  = getItemList().at( m_pItemListLB->row( item ) );
     if ( !listItem ) {
@@ -606,8 +609,9 @@
     int currentItemIndex = m_pItemListLB->currentRow();
 
     // index is -1 . Quit
-    if ( currentItemIndex==-1 )
+    if ( currentItemIndex==-1 ) {
         return;
+    }
 
     UMLClassifierListItem* selectedItem = getItemList().at( currentItemIndex );
     //should really wait for signal back
@@ -629,8 +633,9 @@
     saveCurrentItemDocumentation();
     m_bSigWaiting = true;
     m_pLastObjectCreated = Object_Factory::createChildObject(m_pClassifier, m_itemType);
-    if ( m_pLastObjectCreated == NULL )
+    if ( m_pLastObjectCreated == NULL ) {
         m_bSigWaiting = false;
+    }
 }
 
 void ClassifierListPage::saveCurrentItemDocumentation()
@@ -638,8 +643,9 @@
     int currentItemIndex = m_pItemListLB->currentRow();
 
     // index is not in range, quit
-    if ( currentItemIndex < 0 || currentItemIndex >= getItemList().count() )
+    if ( currentItemIndex < 0 || currentItemIndex >= getItemList().count() ) {
         return;
+    }
 
     UMLClassifierListItem* selectedItem = getItemList().at( currentItemIndex );
     if (selectedItem) {
@@ -722,9 +728,9 @@
     return true;
 }
 
-
-int ClassifierListPage::calculateNewIndex(Uml::Object_Type /* ot */)
+int ClassifierListPage::calculateNewIndex(Uml::Object_Type ot)
 {
+    Q_UNUSED(ot);
     return m_pItemListLB->count();
 }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classifierlistpage.h #814713:814714
@@ -5,7 +5,7 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- *   copyright (C) 2003-2007                                               *
+ *   copyright (C) 2003-2008                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -18,14 +18,15 @@
 #include <QtGui/QHBoxLayout>
 #include <QtGui/QGroupBox>
 #include <QtGui/QListWidget>
-#include <QtGui/QTextEdit>
+
 //kde includes
+#include <ktextedit.h>
 #include <karrowbutton.h>
 #include <kdialogbuttonbox.h>
 
 //app includes
-#include "../listpopupmenu.h"
-#include "../umlclassifierlistitemlist.h"
+#include "listpopupmenu.h"
+#include "umlclassifierlistitemlist.h"
 
 class UMLObject;
 class UMLClassifier;
@@ -157,8 +158,8 @@
 
     QGroupBox* m_pDocGB;
     QGroupBox* m_pItemListGB;
-    QTextEdit* m_pDocTE;
-    QTextEdit* m_pCodeTE;
+    KTextEdit* m_pDocTE;
+    KTextEdit* m_pCodeTE;
     QListWidget* m_pItemListLB;
 
     KArrowButton* m_pTopArrowB;




More information about the umbrello-devel mailing list