Bug 377611 - c++ codegenerator creates uncompilable code with aggregations
Summary: c++ codegenerator creates uncompilable code with aggregations
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.21.2 (KDE Applications 16.12.2)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-14 13:26 UTC by Ralf Habacker
Modified: 2017-03-14 16:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.21.80 (KDE Applications 17.03.80)
Sentry Crash Report:


Attachments
xmi test file (12.04 KB, text/x-xmi)
2017-03-14 13:26 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2017-03-14 13:26:04 UTC
Created attachment 104557 [details]
xmi test file

Generating code from the appended xmi file is uncompilable because
1. the generated term '#include vector' is invalid
2. the genereated term 'vector<File*> m_fileVector;' uses an undefined template class

How to reproduce:
1. start umbrello and load the appended xmi file
2. Generate c++ code
3. try to compile Folder.cpp

What happens:
The generated files are uncompilable

What is expected:
The generated files should be compilable
Comment 1 Ralf Habacker 2017-03-14 14:16:37 UTC
Git commit 79bb16e2431a28741dd1af7b251e9551ac8e84bf by Ralf Habacker.
Committed on 14/03/2017 at 14:16.
Pushed by habacker into branch 'master'.

Fix 'c++ codegenerator creates uncompilable code'.

To fix initialize UmbrelloSettings attribute vectorClassName
with namespace (std::vector) and wrap attribute vectorClassNameInclude
with '<'...'>'.
FIXED-IN:2.21.80 (KDE Applications 17.03.80)

M  +1    -1    umbrello/codegenerators/cpp/cppwriter.cpp
M  +2    -2    umbrello/umbrello.kcfg

https://commits.kde.org/umbrello/79bb16e2431a28741dd1af7b251e9551ac8e84bf
Comment 2 Ralf Habacker 2017-03-14 16:32:59 UTC
Git commit a0b2781d534def5ad382b5f2874d5c9b12c56213 by Ralf Habacker.
Committed on 14/03/2017 at 16:25.
Pushed by habacker into branch 'master'.

Let string class name and include file in code generator properties be in sync with vector include.

M  +1    -1    umbrello/codegenerators/cpp/cppwriter.cpp
M  +2    -2    umbrello/umbrello.kcfg

https://commits.kde.org/umbrello/a0b2781d534def5ad382b5f2874d5c9b12c56213