Avoids calling into QFontMetrics on startup for a method that is hardly used.
- Group Reviewers
- R120:2082cfcbfa33: [Workspace Scripting] Turn "gridUnit" into a property getter function
WorkspaceScripting::ScriptEngine::setupEngine consistently showed up with 1.2% on startup in QFontMetrics, now it's virtually zero.
- Verified in scripting console that gridUnit still returns the same value it did before and that the method is not executed on startup anymore but whenever I call it from JS.
- Created a new panel whose default height is gridUnit * 2, its size looked sane