Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.0
-
None
Description
Scenario: An application loads an .ui file using QUiLoader. The .ui file contains a reference to a custom widget which loads its own UI from another .ui file using QUiLoader.
Problem: Loading the .ui file in the custom widget plugin fails or even causes a crash. When the UiLoader is called from the custom widget plugin, the debug output inserted into QUiLoader::load() shows the hash object to be located at i.e. 0x80fde38 for the plugin. But then, when QUiLoader::load() calls QAbstractFormBuilder::load(), the hash object is suddenly reported to be at i.e. 0x80f9fc8 again (the location reported from the main application).
This has the effect that the previously created FormBuilderExtra entry in the hash object is not found. Instead, a new entry is created in this other hash object, but this entry is missing the ResourceBuilder object which results in a crash when the ResourceBuilder is referenced later in a statement like "if (afb->resourceBuilder()->isResourceProperty(p))".