Procedure to trigger the crash:
* Create a document
* Create a spreadsheet and open it
* Close the 3D view
* Open the Start page
* It may or may not crash but the program is in an undefined state
The reason of the crash is caused by an inappropriate use of static_cast.
This bug is caused by PR 17152.
To fix the crash use dynamic_cast instead. If the cast fails it returns
a null pointer instead of a dangling pointer.
Fixes: Maintaining schemas is difficult and error-prone
- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
* Update tooltip to indicate support for multiple custom folder paths
* Remove migration step that worked around lack of multiple folder support
* Remove obsolete migration method
* Address linter warnings: build/include_what_you_use
* Add QStringList as requested on https://github.com/FreeCAD/FreeCAD/pull/19948/files#r1982267583
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
* Start: add optional additional folder view
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added logic to migrate ShowCustomFolder parameter
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename Additional to Custom folder
* Change Start page text to sentence case for consistency
* Fix breakage created by pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rearrange migration logic to make it more explicit
* Revert "Change Start page text to sentence case for consistency"
This reverts commit 8a31a1238c0380ddbe13e6e5838a3be6b13400a5.
* Make parameterGroup local
* Apply suggestions and linter improvements
* Adapted suggestion to simplify migration logic
* Start: Warning -> Message for rename of ShowCustomFolder
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>