[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators

Oliver Kellogg okellogg at users.sourceforge.net
Sun Jun 4 14:23:26 UTC 2006


SVN commit 548035 by okellogg:

EBN says do not compare a QString to "". Instead use the .isEmpty() method.


 M  +1 -1      rubycodeoperation.cpp  
 M  +2 -2      rubywriter.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/rubycodeoperation.cpp #548034:548035
@@ -190,7 +190,7 @@
         }
     
         QString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName());
-        if (    typeStr != "" 
+        if ( !typeStr.isEmpty()
                 && !QRegExp("^void\\s*$").exactMatch(typeStr) 
                 && comment.contains("_returns_") == 0 ) 
         {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/rubywriter.cpp #548034:548035
@@ -322,7 +322,7 @@
             h << m_indentation << "# "<< docStr << m_endl;
 
             QString typeStr = cppToRubyType(op->getTypeName());
-            if (typeStr != "" && typeStr != "void" && docStr.contains("_returns_") == 0) {
+            if (!typeStr.isEmpty() && typeStr != "void" && docStr.contains("_returns_") == 0) {
                 h << m_indentation << "# * _returns_ " << typeStr << m_endl;
             }
         }
@@ -378,7 +378,7 @@
     description.replace("m_", "");
     description.replace("\n", QString("\n") + m_indentation + "# ");
 
-    if (description != "") {
+    if (!description.isEmpty()) {
         h << m_indentation << "# " << description << m_endl;
     }
 




More information about the umbrello-devel mailing list