New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform subclass forward declaration even if header is empty #499

Merged
merged 1 commit into from Feb 9, 2019

Conversation

Projects
None yet
2 participants
@sodevel
Copy link
Contributor

sodevel commented Feb 8, 2019

Only now i discovered that commit 81a138b removes a bug/feature that some of my project files rely on. Before that commit a subclass forward declaration was always done, now it is only done if the subclass also defines a header.

My affected project files use e.g. a book control to which i add pages which are panels but i use the subclass feature to replace these with other classes. These other classes i define further down in the project file so i don't have (and can't if i don't want to depend on the filename of the project) to define a header for them. Because i generate C++ code and the subclasses get declared after the book control this doesn't compile.

This PR restores the behavior to generate forward declarations even with no defined header but only if forward declaration is enabled. This keeps the current feature to remove redundant forward declarations but adds the feature to enable them if they are required, what wxFormBuilder cannot detect by itself.

Perform subclass forward declaration even if header is empty
This restores the behavior to before commit 81a138b but with the extension that this is only done if the subclass should be forward declared.
This allows to forward declare local elements in the project file so they are not required to be defined before elements that depend on them.

@jhasse jhasse merged commit 93dc5c2 into wxFormBuilder:master Feb 9, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jhasse jhasse added this to the 3.9.1 milestone Feb 15, 2019

@sodevel sodevel deleted the sodevel:fix_localforward branch Feb 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment