The application got unstable on exit under various conditions
(e.g. LayoutView created in script). Reason was the ownership
management of LayoutView which interfered with Qt widget
lifetime management.
The solution now is based on a clean widget/view hierarchy
and a consistent plugin parent/child relationship.
In addition, a new class is enabled which allows creating
a true QWidget (rather QFrame) for a LayoutView again.
With these fixes, unit tests pass with MacOS
(set DYLD_LIBRARY_PATH!)
1.) MacOS takes popen vs. pclose seriously
By using fopen we basically spoil the system and other popen
won't work.
2.) For system integrity, MacOS does not propagate DYLD_LIBRARY_PATH
to child processes such as sh. This has to be done explictly.
3.) Search the klayout binary in the right path (klayout.app/...)
4.) Reset KLAYOUT_HOME for less intervention by installed macros
This commit also contains some important fixes:
* Option -wd wasn't working
* Relative layout file paths in session files are resolved as relative
to the session file. On writing, absolute paths are used, so this
change only affects session files build intentionally.
Plus:
* Program version is available in unit tests too
* Fixed a typo in the RBA::Expression documentation