Instead, pass a reference to the root item when mapping the window,
at which point we can downcast to the new Window item. If we have one,
then we'll read its width/height (for initial values) and install
bindings to keep them up-to-date.
The compiler complains that intptr_t is not the same type as "long long".
The "long long" originates from "pub struct VisitChildrenResult(i64);"
and I suppose the compiler is right for potential 32-bit architectures. So
let's use int64_t as counter-part to i64.
==1118823== Invalid read of size 8
==1118823== at 0x5334491: QFontDatabase::removeAllApplicationFonts() (in /usr/lib/libQt5Gui.so.5.15.0)
==1118823== by 0x523D67B: QGuiApplication::~QGuiApplication() (in /usr/lib/libQt5Gui.so.5.15.0)
==1118823== by 0x5ED7C56: __run_exit_handlers (in /usr/lib/libc-2.31.so)
==1118823== by 0x5ED7DFD: exit (in /usr/lib/libc-2.31.so)
==1118823== by 0x5EC0008: (below main) (in /usr/lib/libc-2.31.so)
==1118823== Address 0x30 is not stack'd, malloc'd or (recently) free'd
The QFontDatabase is stored in a Q_GLOBAL_STATIC, so by storing the QApplication
in a static, it is going to be destroyed after the QFontDatabase
The use of the texture atlas may result in pixels from adjacent textures
bleeding into the currently rendered texture. The standard technique appears to be
to add a padding around each image.
We already keep the context in an RC, might as well keep another copy :-)
This re-applies commit 9b0dfa14b5 but
replaces the Clone trait on Shader, which would lead to duplicate and
too early program deletion, with an Rc<Shader>.
This adds horizontal_alignment/vertical_alignment properties, along with
width/height to Text.
This still uses a hard-coded enumeration in the compiler, which is meant
to go away in favor of general enum support.
Replace the three (ref)cells in the window with one refcell to an enum that
determines that the window is either unmapped (with a factory available)
or mapped (we have a graphics backend and rendering cache).
The interior mutability was visible to the outside via new() returning a
Rc<RefCell<..>>.
When doing deep recursions during rendering for example, that window is
mutably borrowed. That in turn prevents us from adding further members
such as window scale properties, etc. that may be read *during* that
traversal as they'd require an immutable refernce to a already mutably
borrowed refcell contents.
So instead, make the individual fields refcells.
Don't glob for all package.json files though, as neon leaves some around
in the target/ folder, which is persisted through the cache.
This should reduce the dependency to npmjs.com being up and running.