Minor optimisation by instantiating one QFontDatabase Object, and using
it in KFontChooser::Private members.
Details
Details
- Reviewers
cfeck apol bport dfaure - Group Reviewers
Frameworks
kfontchooserdialogtest app still works
Diff Detail
Diff Detail
- Repository
- R236 KWidgetsAddons
- Branch
- l-kfontchooser-2 (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 24090 Build 24108: arc lint + arc unit
Comment Actions
I don't think this makes any difference, they all share the same underlying private singleton.
So all this does is to use a tiny bit more memory while the widget is up (the member var).
The additional CPU usage without this patch or the additional memory usage with this patch are both negligible, so I can't really say which way is best.
Comment Actions
OK, thanks for the explanation. (It seems Q{Font,Mime}Database are special in that regard).
Comment Actions
QMimeDatabase was modeled after QFontDatabase, so it's not surprising that they both work the same way ;)