Bug 97188: inline functions are generated in cpp file (normal)
Opened:2005-01-16 22:14
Product:umbrello
Component:general
Version:unspecified
Status:RESOLVED
Platform:unspecified
Resolution:FIXED
Reporter:Henrik Steffien
Assigned to:Umbrello Development Group

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.


------- Additional Comment #1 From Paulo Roberto Rodrigues Sehn 2005-07-13 03:06 -------
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)
 at  at  -40,7 +40,7  at  at
 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 "";
 at  at  -57,7 +57,7  at  at
     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)
 at  at  -40,7 +40,7  at  at
 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 "";
 at  at  -95,6 +95,8  at  at
             paramStr  += ", ";
     }
 
+    // set using the sterreotype if apropriated
+    
     // set start/end method text
     QString startText = methodReturnType+" "+methodName+" ("+paramStr+")";


------- Additional Comment #2 From Oliver Kellogg 2005-07-13 22:36 -------
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
 at  at  -1,7 +1,7  at  at
 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
 at  at  -20,29 +20,39  at  at
 Zoltan Bartko <bartko.zoltan  at pobox.sk>
 Luis De la Parra Blum <lparrab  at gmx.net>
 Raymond Bosman <bosman  at hetnet.nl>
+Ben Burton <bab  at debian.org>
 Albert Cervera <albertca  at jazzfree.com>
 Albert Astals Cid <tsdgeos  at terra.es>
 Vincent Decorges <vincent.decorges  at eivd.ch>
+Jean-Remy Falleri <jr.falleri  at gmail.com>
+Andi Fischer <andi.fischer  at hispeed.ch>
 Pascal Fleury <fleury  at users.sourceforge.net>
+Gregorio Guidi <g.guidi  at sns.it>
 Esben Mose Hansen <esben  at despammed.com>
+Olaf Hartig <OleBowle  at gmx.de>
 Michel Hermier <michel.hermier  at wanadoo.fr>
+Paul Hensgen <phensgen  at bigpond.net.au>
 David Hugh-Jones <hughjonesd  at yahoo.co.uk>
 Pekka Jääskeläinen <pjaaskel  at cs.tut.fi>
 Klas Kalass  <klas.kalass  at gmx.de>
 Oliver Kellogg <okellogg  at users.sourceforge.net>
 Tobias Koenig <tokoe  at kde.org>
 Piotr Kolaczkowski <P.Kolaczkowski  at elka.pw.edu.pl>
+Matthias Kretz <kretz  at kde.org>
 Thorsten Kunz <tk  at bytecrash.net>
 Gustavo Madrigal <gmadrigal  at nextphere.com>
 martin <mv123q3  at hotmail.com>
 Laurent Montel <montel  at kde.org>
+Lutz Mueller <lutz.mueller  at gmx.de>
 Heiko Nardmann <heiko.nardmann  at onlinehome.de>
 Carsten Pfeiffer <pfeiffer  at kde.org>
 Ivan Porres <iporres  at abo.fi>
+Ruediger Ranft <kdebugs  at rranft1.mail.htwm.de>
 John Ratke <jratke  at comcast.net>
 Daniel Richard G. <skunk  at iskunk.org>
 Jonathan Riddell <jr  at jriddell.org>
 Peeter Russak <pezz  at tkwcy.ee>
+Paulo Roberto Rodriguez Sehn <paulo.sehn  at gmail.com>
 Achim Spangler <Achim.Spangler  at mnet-online.de>
 Sebastian Stein <seb.stein  at gmx.de>
 Andrew Sutton <asutton  at cs.kent.edu>
--- branches/KDE/3.4/kdesdk/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp #434367:434368
 at  at  -40,7 +40,7  at  at
 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 "";
--- branches/KDE/3.4/kdesdk/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp #434367:434368
 at  at  -40,7 +40,7  at  at
 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 "";


Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments:


View Bug Activity   |   Format For Printing


Attachment Type Modified Status Actions
Create a New Attachment (proposed patch, testcase, etc.) View All


Actions: Query | Reports Search:   New Account | Log In