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

Oliver Kellogg okellogg at users.sourceforge.net
Wed Dec 10 11:18:02 UTC 2003


CVS commit by okellogg: 

Fix syntax of generated include statements.


  M +3 -3      cppheadercodedocument.cpp   1.16
  M +3 -3      cppsourcecodedocument.cpp   1.12


--- kdesdk/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp  #1.15:1.16
@@ -432,5 +432,5 @@ void CPPHeaderCodeDocument::updateConten
         QString sStartBrak = stringGlobal ? "<" : "\"";
         QString sEndBrak = stringGlobal ? ">" : "\"";
-        includeStatement.append("include "+sStartBrak+policy->getStringClassNameInclude()+sEndBrak+";"+endLine);
+        includeStatement.append("#include "+sStartBrak+policy->getStringClassNameInclude()+sEndBrak+endLine);
         if ( hasObjectVectorClassFields() )
         {
@@ -438,5 +438,5 @@ void CPPHeaderCodeDocument::updateConten
                 QString vStartBrak = vecGlobal ? "<" : "\"";
                 QString vEndBrak = vecGlobal ? ">" : "\"";
-                QString value ="include "+vStartBrak+policy->getVectorClassNameInclude()+vEndBrak+";";
+                QString value ="#include "+vStartBrak+policy->getVectorClassNameInclude()+vEndBrak;
                 includeStatement.append(value+endLine);
         }
@@ -452,5 +452,5 @@ void CPPHeaderCodeDocument::updateConten
                 packageMap->insert(con,con->getPackage());
                 if(con != getParentClassifier())
-                        includeStatement.append("include "+gen->cleanName(con->getName().lower())+".h;"+endLine);
+                        includeStatement.append("#include \""+gen->cleanName(con->getName().lower())+".h\""+endLine);
         }
         // now, add/update the includes codeblock

--- kdesdk/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp  #1.11:1.12
@@ -192,7 +192,7 @@ void CPPSourceCodeDocument::updateConten
         //    don't slow down or anything. (TZ)
         QString includeStatement = "";
-        includeStatement.append("include "+policy->getStringClassNameInclude()+";"+endLine);
+        includeStatement.append("#include \""+policy->getStringClassNameInclude()+"\""+endLine);
         if ( hasObjectVectorClassFields() )
-                includeStatement.append("include "+policy->getVectorClassNameInclude()+";"+endLine);
+                includeStatement.append("#include "+policy->getVectorClassNameInclude()+"\""+endLine);
 
         //only include classes in a different package from this class
@@ -205,5 +205,5 @@ void CPPSourceCodeDocument::updateConten
         {
                 packageMap->insert(con,con->getPackage());
-                includeStatement.append("include "+gen->cleanName(con->getName().lower())+".h;"+endLine);
+                includeStatement.append("#include \""+gen->cleanName(con->getName().lower())+".h\""+endLine);
         }
         // now, add/update the includes codeblock






More information about the umbrello-devel mailing list