Bug 134729 - code import - partial class declaration error
Summary: code import - partial class declaration error
Status: RESOLVED NOT A BUG
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-27 10:14 UTC by Rafal Molotkiewicz
Modified: 2006-09-29 21:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
This code imports just fine, incl. methods at the real Application. (290 bytes, text/x-c++hdr)
2006-09-27 18:49 UTC, Oliver Kellogg
Details

Note You need to log in before you can comment on or make changes to this bug.
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.