"Professional CMake" book suggest the following:
"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."
Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
* Fixed a mistake made in getSubObjectListFlatten()
* Applied modifications according to review comments
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
* Formatted and refactored code imported for the DocumentObject class
* Formatted and refactored code imported for the SubObjectT class
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
* Added SubObjectT methods normalize(), normalized(), hasSubObject() and hasSubElement()
* Updated DocumentObject::getSubObjectList()
* Applied modifications to make the code compile
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.
The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).
Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".
The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
It is originally used for dependency selection when copying object.
Modified to improve auto dependency selection, and for use by Link
configuration object setup, which also involves dependency selection.
Derived from App::DocumentObjectT to add support of sub object
Also some minor changes to App::DocumentObjectT
Changed Gui::SelectionChanges to make use of SubObjectT
* Add new API and signal handler in document observer
* Pre initialize python handler function to improve performance. In
case Python code use dynamic patching, i.e. add class method at
runtime (which is rare and should be discouraged), the python feature
can be re-initialized by simply assign proeprty Proxy again.
* Add property tracking in DocumentObjectT
* WidgetFactory adds support for accepting python QIcon, which is used
by ViewProviderPythonFeature