Bug 97188 - inline functions are generated in cpp file
Summary: inline functions are generated in cpp file
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-16 22:14 UTC by Henrik Steffien
Modified: 2005-07-13 22:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Steffien 2005-01-16 22:14:30 UTC
Version:           1.4.0-beta1 (using KDE KDE 3.3.1)
Compiler:          g++ (GCC) 3.3.5 (Debian 1:3.3.5-5) 
OS:                Linux

Hello,

I tested version 1.4.0-beta1 compiled from source tarball from 2005-01-15 05:07.
I generated cpp source from a simple class diagram. In the generators language options I selected "functions are inline". The one function defined in my sample class was correctly generated inline in the header file. But there is still a function definition of the same function in the cpp file as if it were no inline function. This makes compilation impossible.
Comment 1 Paulo Roberto Rodrigues Sehn 2005-07-13 03:06:21 UTC
I would like to suggest this patch to fix this issue

Index: umbrello/codegenerators/cppsourcecodeoperation.cpp
===================================================================
--- umbrello/codegenerators/cppsourcecodeoperation.cpp  (revision 434093)
+++ umbrello/codegenerators/cppsourcecodeoperation.cpp  (working copy)
@@ -40,7 +40,7 @@
 void CPPSourceCodeOperation::updateContent( )
 {
     CPPCodeGenerationPolicy * policy = (CPPCodeGenerationPolicy*) getParentDocument()->getParentGenerator()->getPolicy();
-    bool isInlineMethod = policy->getAccessorsAreInline( );
+    bool isInlineMethod = policy->getOperationsAreInline();
 
     if(!isInlineMethod)
         setText(""); // change whatever it is to "";
@@ -57,7 +57,7 @@
     UMLClassifier * c = doc->getParentClassifier();
     UMLOperation * o = getParentOperation();
     bool isInterface = doc->parentIsInterface();
-    bool isInlineMethod = policy->getAccessorsAreInline( );
+    bool isInlineMethod = policy->getOperationsAreInline();
 
     // first, the comment on the operation
     QString comment = o->getDoc();
Index: umbrello/codegenerators/cppheadercodeoperation.cpp
===================================================================
--- umbrello/codegenerators/cppheadercodeoperation.cpp  (revision 434093)
+++ umbrello/codegenerators/cppheadercodeoperation.cpp  (working copy)
@@ -40,7 +40,7 @@
 void CPPHeaderCodeOperation::updateContent( )
 {
     CPPCodeGenerationPolicy * policy = (CPPCodeGenerationPolicy*) getParentDocument()->getParentGenerator()->getPolicy();
-    bool isInlineMethod = policy->getAccessorsAreInline( );
+    bool isInlineMethod = policy->getOperationsAreInline( );
 
     if(isInlineMethod)
         setText(""); // change whatever it is to "";
@@ -95,6 +95,8 @@
             paramStr  += ", ";
     }
 
+    // set using the sterreotype if apropriated
+    
     // set start/end method text
     QString startText = methodReturnType+" "+methodName+" ("+paramStr+")";
Comment 2 Oliver Kellogg 2005-07-13 22:36:20 UTC
SVN commit 434368 by okellogg:

BUG:97188 - updateContent(): Backport fix by Paulo Sehn.


 M  +1 -1      ChangeLog  
 M  +10 -0     THANKS  
 M  +1 -1      umbrello/codegenerators/cppheadercodeoperation.cpp  
 M  +1 -1      umbrello/codegenerators/cppsourcecodeoperation.cpp  


--- branches/KDE/3.4/kdesdk/umbrello/ChangeLog #434367:434368
@@ -1,7 +1,7 @@
 Version 1.4.2 (maintenance release)
 
 * Bugs fixed from http://bugs.kde.org :
-72016 103170 106356 106632 106673 107101 107551
+72016 97188 103170 106356 106632 106673 107101 107551 108688
 
 Version 1.4.1 (maintenance release)
 
--- branches/KDE/3.4/kdesdk/umbrello/THANKS #434367:434368
@@ -20,29 +20,39 @@
 Zoltan Bartko <bartko.zoltan @pobox.sk>
 Luis De la Parra Blum <lparrab @gmx.net>
 Raymond Bosman <bosman @hetnet.nl>
+Ben Burton <bab @debian.org>
 Albert Cervera <albertca @jazzfree.com>
 Albert Astals Cid <tsdgeos @terra.es>
 Vincent Decorges <vincent.decorges @eivd.ch>
+Jean-Remy Falleri <jr.falleri @gmail.com>
+Andi Fischer <andi.fischer @hispeed.ch>
 Pascal Fleury <fleury @users.sourceforge.net>
+Gregorio Guidi <g.guidi @sns.it>
 Esben Mose Hansen <esben @despammed.com>
+Olaf Hartig <OleBowle @gmx.de>
 Michel Hermier <michel.hermier @wanadoo.fr>
+Paul Hensgen <phensgen @bigpond.net.au>
 David Hugh-Jones <hughjonesd @yahoo.co.uk>
 Pekka J