mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
![]() We currently forward declare classes as we use them in functions. But this breaks if classes with the same name were declared in the parent namespace. As shown with this example ```C++ // Uncomment that line to make the code break //struct SharedGlobals; namespace ns { // Is that a forward declaration in `ns`? // Depends if it was declared before in the parent namespace void foo(struct SharedGlobals *x) {} // Actualy define ns::SharedGlobal struct SharedGlobals { int x; }; int xyz() { SharedGlobals globals; foo(&globals); } } ``` So make sure we forward-declare the classes properly to be more robust and be able to include generated file with namespace after a file without namespace CC #2909 |
||
---|---|---|
.. | ||
generator | ||
LICENSES | ||
llr | ||
lookup | ||
parser | ||
parser-test-macro | ||
passes | ||
tests | ||
widgets | ||
build.rs | ||
builtin_macros.rs | ||
builtins.slint | ||
Cargo.toml | ||
diagnostics.rs | ||
embedded_resources.rs | ||
expression_tree.rs | ||
fileaccess.rs | ||
generator.rs | ||
langtype.rs | ||
layout.rs | ||
lexer.rs | ||
lib.rs | ||
literals.rs | ||
llr.rs | ||
load_builtins.rs | ||
lookup.rs | ||
namedreference.rs | ||
object_tree.rs | ||
parser.rs | ||
passes.rs | ||
pathutils.rs | ||
README.md | ||
translations.rs | ||
typeloader.rs | ||
typeregister.rs |
The Slint Compiler Library
NOTE: This library is an internal crate of the Slint project.
This crate should not be used directly by applications using Slint.
You should use the slint
crate instead.
WARNING: This crate does not follow the semver convention for versioning and can
only be used with version = "=x.y.z"
in Cargo.toml.