Bug 134729

Summary: code import - partial class declaration error
Product: [Applications] umbrello Reporter: Rafal Molotkiewicz <molotster>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: This code imports just fine, incl. methods at the real Application.

Description Rafal Molotkiewicz 2006-09-27 10:14:55 UTC
Version:           1.5.4 (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
Compiler:          gcc 3 & 4 compiler-independent error
OS:                Linux

The following code style is perfectly ok in c++, and often needed:

//------------
class Application; //Just to make Application available to ApplicationError class

class ApplicationError
{
  ApplicztionError(Application&);
  //some other code
}

class Application
{
  //Real functions and members of Application class
}
//------------

However, Umbrello imports header, it creates class using first entry - the class appears empty - and ignores real class description that appears later in the file.

Proposed solution:
If class has no {} after it, it should be ignored. If the end of imports is reached without more complex declaration, it's the only case when such empty class should be used.
Comment 1 Oliver Kellogg 2006-09-27 18:49:04 UTC
Created attachment 17944 [details]
This code imports just fine, incl. methods at the real Application.
Comment 2 Oliver Kellogg 2006-09-27 18:51:24 UTC
Cannot confirm on branches/KDE/3.5/kdesdk/umbrello r587943.
Comment 3 Rafal Molotkiewicz 2006-09-29 21:07:32 UTC
Checked couple times.
This code does not import properly on my system:

//filename: test.h
//content:

class test;

class helper
{
	public:
	helper(test&);
}

class test
{
	public:
	test(test&)
	helper help;
}

//End Of File

The result is empty test class and no test class at all.

POCO (http://www.appinf.com/poco/) headers can't be imported as well, jut the same  case.
If it's corrected in   the cvs/svn  version, then sorry... but I've wroted the version I am using and it does posses this bug.