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

Sharan Rao sharanrao at gmail.com
Wed May 30 21:56:29 UTC 2007


SVN commit 669958 by sharan:

lots and lots and lots of EBN fixes :)
mostly pertaining to QString::null, and comparision of strings wih ""

lots more remaining. :/


 M  +1 -1      attribute.h  
 M  +2 -2      classifier.cpp  
 M  +1 -1      classifier.h  
 M  +1 -0      clipboard/umlclipboard.cpp  
 M  +1 -0      clipboard/umlclipboard.h  
 M  +1 -1      codegenerators/cppheadercodedocument.cpp  
 M  +1 -1      codegenerators/cppsourcecodedocument.cpp  
 M  +2 -2      codegenerators/csharpwriter.cpp  
 M  +1 -1      codeimport/kdevcppparser/ast_utils.h  
 M  +1 -1      codeimport/kdevcppparser/cpptree2uml.cpp  
 M  +1 -1      codeimport/kdevcppparser/lexer.h  
 M  +1 -1      codeimport/kdevcppparser/urlutil.h  
 M  +1 -1      dialog_utils.h  
 M  +1 -1      dialogs/codeeditor.h  
 M  +1 -1      dialogs/importprojectdlg.cpp  
 M  +1 -1      dialogs/settingsdlg.cpp  
 M  +6 -6      floatingtextwidget.cpp  
 M  +1 -1      import_rose.cpp  
 M  +1 -1      messagewidget.cpp  
 M  +2 -2      model_utils.h  
 M  +1 -1      object_factory.h  
 M  +1 -1      operation.h  
 M  +1 -1      pinwidget.cpp  
 M  +1 -1      umllistview.cpp  
 M  +2 -2      umlobject.h  
 M  +1 -1      umlviewimageexporter.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/attribute.h #669957:669958
@@ -96,7 +96,7 @@
     /**
      * Reimplement method from UMLObject.
      */
-    QString getFullyQualifiedName(QString separator = QString::null,
+    QString getFullyQualifiedName(QString separator = QString(),
                                   bool includeRoot = false) const;
 
     /**
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.cpp #669957:669958
@@ -64,7 +64,7 @@
             newIcon = Uml::it_Interface;
             break;
         case ot_Class:
-            UMLObject::setStereotype(QString::null);
+            UMLObject::setStereotype(QString());
             UMLObject::m_bAbstract = false;
             newIcon = Uml::it_Class;
             break;
@@ -277,7 +277,7 @@
     return m_List.count();
 }
 
-UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString::null*/) {
+UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString()*/) {
     QString name = currentName;
     bool goodName = !name.isEmpty();
     if (!goodName)
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.h #669957:669958
@@ -80,7 +80,7 @@
      * @param name  An optional name, used by when creating through UMLListView
      * @return  The UMLAttribute created
      */
-    virtual UMLAttribute* createAttribute(const QString &name = QString::null);
+    virtual UMLAttribute* createAttribute(const QString &name = QString());
 
     /**
      * Adds an attribute to the class.
--- trunk/KDE/kdesdk/umbrello/umbrello/clipboard/umlclipboard.cpp #669957:669958
@@ -693,3 +693,4 @@
                         i18n("Paste Error") );
 }
 
+#include "umlclipboard.moc"
--- trunk/KDE/kdesdk/umbrello/umbrello/clipboard/umlclipboard.h #669957:669958
@@ -33,6 +33,7 @@
  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
  */
 class UMLClipboard : public QObject {
+    Q_OBJECT
 public:
     /**
      * Constructor.
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp #669957:669958
@@ -416,7 +416,7 @@
                 includeStatement.append("#include \""+CodeGenerator::cleanName(con->getName().lower())+".h\""+endLine);
         }
     // now, add/update the includes codeblock
-    CodeBlockWithComments * inclBlock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString::null, 0, false);
+    CodeBlockWithComments * inclBlock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString(), 0, false);
     if(includeStatement.isEmpty() && inclBlock->getContentType() == CodeBlock::AutoGenerated)
         inclBlock->setWriteOutText(false);
     else
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp #669957:669958
@@ -144,7 +144,7 @@
     // Include own header file
     QString myOwnName( getParentClassifier()->getName() );
     includeStatement.append("#include \""+CodeGenerator::cleanName(myOwnName.lower())+".h\""+endLine);
-    CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString::null, 0, false);
+    CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString(), 0, false);
     iblock->setWriteOutText(true);
 
     // After the includes we have just 2 big blocks basically, the "constructor" block and the
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/csharpwriter.cpp #669957:669958
@@ -477,7 +477,7 @@
 
             // FIXME: "returns" should contain documentation, not type.
             cs << m_container_indent << m_indentation << "/// <returns>";
-            if (op->getTypeName() != "") {
+            if (!( op->getTypeName() ).isEmpty()) {
                 cs << makeLocalTypeName(op);
             }
             cs << "</returns>" << m_endl;
@@ -500,7 +500,7 @@
         }
 
         // return type
-        if (op->getTypeName() == "") {
+        if (( op->getTypeName() ).isEmpty()) {
             cs << "void ";
         }
         else {
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h #669957:669958
@@ -24,6 +24,6 @@
 AST* findNodeAt( AST* unit, int line, int column );
 void scopeOfNode( AST* ast, QStringList& );
 QString typeSpecToString( TypeSpecifierAST* typeSpec );
-QString declaratorToString( DeclaratorAST* declarator, const QString& scope = QString::null, bool skipPtrOp=false );
+QString declaratorToString( DeclaratorAST* declarator, const QString& scope = QString(), bool skipPtrOp=false );
 
 #endif // __ast_utils_h
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp #669957:669958
@@ -556,7 +556,7 @@
 
             QString name;
             if (param->declarator())
-                name = declaratorToString(param->declarator(), QString::null, true );
+                name = declaratorToString(param->declarator(), QString(), true );
 
             QString tp = typeOfDeclaration( param->typeSpec(), param->declarator() );
 
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.h #669957:669958
@@ -214,7 +214,7 @@
     void setPreprocessorEnabled( bool enabled );
 
     void resetSkipWords();
-    void addSkipWord( const QString& word, SkipType skipType=SkipWord, const QString& str = QString::null );
+    void addSkipWord( const QString& word, SkipType skipType=SkipWord, const QString& str = QString() );
 
     QString source() const;
     void setSource( const QString& source );
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h #669957:669958
@@ -110,7 +110,7 @@
   * Will dump the list of KUrl @p urls on standard output, eventually printing @ aMessage if it
   * is not null.
   */
-  void dump( const KUrl::List &urls, const QString &aMessage = QString::null );
+  void dump( const KUrl::List &urls, const QString &aMessage = QString() );
 
   /**
    * Same as QDir::canonicalPath in later versions of QT. Earlier versions of QT
--- trunk/KDE/kdesdk/umbrello/umbrello/dialog_utils.h #669957:669958
@@ -45,7 +45,7 @@
 QLineEdit* makeLabeledEditField(Q3GroupBox *containingBox, QGridLayout *layout, int row,
                                 QLabel * &label, const QString& labelText,
                                 QLineEdit * &editField,
-                                const QString& editFieldText = QString::null);
+                                const QString& editFieldText = QString());
 
 /**
  * Helper function for requesting a name for an UMLWidget using a dialog.
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/codeeditor.h #669957:669958
@@ -49,7 +49,7 @@
     Q_OBJECT
 public:
 
-    CodeEditor ( const QString & text, const QString & context = QString::null, CodeViewerDialog * parent = 0, const char * name = 0 , CodeDocument * doc = 0);
+    CodeEditor ( const QString & text, const QString & context = QString(), CodeViewerDialog * parent = 0, const char * name = 0 , CodeDocument * doc = 0);
     CodeEditor ( CodeViewerDialog * parent, const char* name = 0, CodeDocument * doc = 0);
     ~CodeEditor ();
 
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/importprojectdlg.cpp #669957:669958
@@ -92,7 +92,7 @@
     }
     QDir dir(url.path());
     if (!dir.exists()){
-        KMessageBox::sorry(this, i18n("This directory doesn't exist."));
+        KMessageBox::sorry(this, i18n("This directory does not exist."));
         return;
     }
     QStringList filter;
--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/settingsdlg.cpp #669957:669958
@@ -40,7 +40,7 @@
     setFaceType( KPageDialog::List );
     m_bChangesApplied = false;
     m_pOptionState = state;
-    setHelp( "umbrello/index.html", QString::null );
+    setHelp( "umbrello/index.html", QString() );
     setupGeneralPage();
     setupFontPage();
     setupUIPage();
--- trunk/KDE/kdesdk/umbrello/umbrello/floatingtextwidget.cpp #669957:669958
@@ -193,16 +193,16 @@
         if (assoc) {
             switch (m_Role) {
               case Uml::tr_MultiA:
-                assoc->setMulti(QString::null, Uml::A);
+                assoc->setMulti(QString(), Uml::A);
                 break;
               case Uml::tr_MultiB:
-                assoc->setMulti(QString::null, Uml::B);
+                assoc->setMulti(QString(), Uml::B);
                 break;
               case Uml::tr_RoleAName:
-                assoc->setRoleName(QString::null, Uml::A);
+                assoc->setRoleName(QString(), Uml::A);
                 break;
               case Uml::tr_RoleBName:
-                assoc->setRoleName(QString::null, Uml::B);
+                assoc->setRoleName(QString(), Uml::B);
                 break;
               case Uml::tr_ChangeA:
                 assoc->setChangeability(Uml::chg_Changeable, Uml::A);
@@ -211,13 +211,13 @@
                 assoc->setChangeability(Uml::chg_Changeable, Uml::B);
                 break;
               default:
-                assoc->setName(QString::null);
+                assoc->setName(QString());
                 break;
             }
         } else {
             MessageWidget *msg = dynamic_cast<MessageWidget*>(m_pLink);
             if (msg) {
-                msg->setName(QString::null);
+                msg->setName(QString());
                 m_pView->removeWidget(this);
             }
         }
--- trunk/KDE/kdesdk/umbrello/umbrello/import_rose.cpp #669957:669958
@@ -308,7 +308,7 @@
             stringOrNodeOpener = shift(tokens);
         } else if (stringOrNodeOpener != "(") {
             value.string = stringOrNodeOpener;
-            PetalNode::NameValue attr(QString::null, value);
+            PetalNode::NameValue attr(QString(), value);
             attrs.append(attr);
             if (tokens.count() && tokens.first() != ")") {
                 kDebug() << loc()
--- trunk/KDE/kdesdk/umbrello/umbrello/messagewidget.cpp #669957:669958
@@ -552,7 +552,7 @@
         if (op) {
             // If the UMLOperation is set, m_CustomOp isn't used anyway.
             // Just setting it empty for the sake of sanity.
-            m_CustomOp = QString::null;
+            m_CustomOp.clear();
         }
     }
 
--- trunk/KDE/kdesdk/umbrello/umbrello/model_utils.h #669957:669958
@@ -82,7 +82,7 @@
  */
 QString uniqObjectName(Uml::Object_Type type,
                        UMLPackage *parentPkg,
-                       QString prefix = QString::null);
+                       QString prefix = QString());
 
 /**
  * Return true if the given tag is a one of the common XMI
@@ -253,7 +253,7 @@
     }
     NameAndType(QString name, UMLObject *type,
                 Uml::Parameter_Direction direction = Uml::pd_In,
-                QString initialValue = QString::null)
+                QString initialValue = QString())
             : m_name(name), m_type(type),
               m_direction(direction), m_initialValue(initialValue) {
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/object_factory.h #669957:669958
@@ -39,7 +39,7 @@
  *                        The default is to ask for the new name.
  */
 UMLObject* createUMLObject(Uml::Object_Type type,
-                           const QString &n = QString::null,
+                           const QString &n = QString(),
                            UMLPackage *parentPkg = 0,
                            bool solicitNewName = true);
 
--- trunk/KDE/kdesdk/umbrello/umbrello/operation.h #669957:669958
@@ -40,7 +40,7 @@
     UMLOperation(const UMLClassifier * parent, const QString& name,
                  Uml::IDType id = Uml::id_None,
                  Uml::Visibility s = Uml::Visibility::Public,
-                 const QString& rt = QString::null);
+                 const QString& rt = QString());
 
     /**
      * Constructs an UMLOperation.
--- trunk/KDE/kdesdk/umbrello/umbrello/pinwidget.cpp #669957:669958
@@ -165,7 +165,7 @@
     UMLWidget::mouseMoveEvent(me);
     int diffX = m_oldX - getX();
     int diffY = m_oldY - getY();
-    if (m_pName!=NULL && m_pName->getText() != "") {
+    if (m_pName!=NULL && !( m_pName->getText() ).isEmpty()) {
         m_pName->setX(m_pName->getX() - diffX);
         m_pName->setY(m_pName->getY() - diffY);
     }
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #669957:669958
@@ -406,7 +406,7 @@
                 kError() << "UMLListView::popupMenuSel: modelFolder is NULL" << endl;
                 return;
             }
-            modelFolder->setFolderFile(QString::null);
+            modelFolder->setFolderFile(QString());
             // Recompute text of the folder
             QString folderText = current->getText();
             folderText.remove( QRegExp("\\s*\\(.*$") );
--- trunk/KDE/kdesdk/umbrello/umbrello/umlobject.h #669957:669958
@@ -206,7 +206,7 @@
      *                     Default: false.
      * @return  The UMLObject's enclosing package(s) as a text.
      */
-    QString getPackage(QString separator = QString::null,
+    QString getPackage(QString separator = QString(),
                        bool includeRoot = false);
 
     /**
@@ -258,7 +258,7 @@
      *                     See UMLDoc::getRootFolder(). Default: false.
      * @return  The fully qualified name of this UMLObject.
      */
-    virtual QString getFullyQualifiedName(QString separator = QString::null,
+    virtual QString getFullyQualifiedName(QString separator = QString(),
                                           bool includeRoot = false) const;
 
     /**
--- trunk/KDE/kdesdk/umbrello/umbrello/umlviewimageexporter.cpp #669957:669958
@@ -81,7 +81,7 @@
 
     // configure & show the file dialog
     KUrl url;
-    KFileDialog fileDialog(url, QString::null, m_view);
+    KFileDialog fileDialog(url, QString(), m_view);
     prepareFileDialog(fileDialog);
     fileDialog.exec();
 




More information about the umbrello-devel mailing list