Avoids calling into QFontMetrics on startup for a method that is hardly used.
Details
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- 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
Diff Detail
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.