Bug 330018 - Issues with imported C++ classes within a namespace
Summary: Issues with imported C++ classes within a namespace
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.12.0
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-16 09:54 UTC by milasudril
Modified: 2015-02-28 08:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.14.1 (KDE 4.14.1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description milasudril 2014-01-16 09:54:58 UTC
For project with several classes (testcase https://github.com/milasudril/gabi/tree/wand-reorg), classes within the Wand namespace cannot be added to the canvas. The classes also shows up in the global namespace (sometimes more than once)

It is not confused by WAND directives:

This example works:

#ifdef __WAND__
target[name[test.h]type[include]]
#endif

namespace Foo
	{
	class Bar
		{
		public:
			void doStuff();
		private:
			int* bar;
		};
	}


Reproducible: Always

Steps to Reproduce:
1. git clone https://github.com/milasudril/gabi -b wand-reorg /some/folder
2. Select all source/*.h in the code import wizard
3. Try to draw the classes in the Wand namespace to the canvas.
Actual Results:  
Stop sign beneth the cursur. No class shows up.

Expected Results:  
A green + sign beneth the cursur. The class should be visible on the canvas.
Comment 1 Ralf Habacker 2014-06-30 20:57:53 UTC
could be reproduced with git master
Comment 2 Ralf Habacker 2014-06-30 21:01:39 UTC
after dragging the debug message similar to the shown below are displayed
umbrello(19961) UMLScene::dragEnterEvent: object  "X00dsQcbqENM"  not found
Comment 3 Ralf Habacker 2014-07-03 20:36:54 UTC
Git commit 6d142956eb33e7f80e9ce3dff576da62cc007bcc by Ralf Habacker.
Committed on 03/07/2014 at 20:33.
Pushed by habacker into branch 'master'.

Fix incomplete uml object generating on c++ import when a class contains a typedef to itself.

Example:
	class Bar {
	public:
	    typedef Bar* (*Foo)();
	};

M  +7    -3    umbrello/codeimport/kdevcppparser/cpptree2uml.cpp

http://commits.kde.org/umbrello/6d142956eb33e7f80e9ce3dff576da62cc007bcc
Comment 4 Ralf Habacker 2014-07-04 17:31:52 UTC
Git commit 288fc91220aaa75110ba35e1655fa10ce3ab3eea by Ralf Habacker.
Committed on 04/07/2014 at 17:32.
Pushed by habacker into branch 'master'.

Check against zero namespace pointer.

M  +2    -1    umbrello/codeimport/kdevcppparser/cpptree2uml.cpp

http://commits.kde.org/umbrello/288fc91220aaa75110ba35e1655fa10ce3ab3eea
Comment 5 Ralf Habacker 2014-07-04 17:31:52 UTC
Git commit 8495de1afb7db8fa6e6ae2e8238161e202474f29 by Ralf Habacker.
Committed on 04/07/2014 at 17:14.
Pushed by habacker into branch 'master'.

Avoid duplicate Invoker and other classes from importing bug 330018 testcase.

It was required to refactor the newly added 'doNotSearch' Import_Utils::createUMLObject()
parameter to a real 'searchInParentPackageOnly' strategy.

This enables classes with the same name in different name spaces.
Related: bug 368810

M  +9    -9    umbrello/codeimport/import_utils.cpp
M  +1    -1    umbrello/codeimport/import_utils.h

http://commits.kde.org/umbrello/8495de1afb7db8fa6e6ae2e8238161e202474f29