diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-05-20 12:33:37 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-05-20 13:05:39 (GMT) |
commit | ef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72 (patch) | |
tree | 0487783dec6fccc9b0d33db42330f3a957065677 /examples/declarative | |
parent | 2c1d1c136102a17eef9ae3c4e9f0cf01338306ae (diff) | |
download | Qt-ef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72.zip Qt-ef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72.tar.gz Qt-ef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72.tar.bz2 |
Fix crash when using fonts in non-gui QApplication
XLFD requires a DISPLAY connection to work. We would get crashes in
a QApplication with GUI disabled when: 1. Not using FontConfig, or
2. Falling back to XLFD for bitmap fonts that require scaling.
The patch disables paths to loadXlfd() when GUI is disabled. This means
that in XLFD, we will always get a box font, which is the same behavior
as when using fonts outside the main thread. There doesn't seem to be
any way around this.
With FontConfig, we will use the font it returns, even if it's a
slightly wrong size. Main consequence will be for using bitmap
fonts for printing on a highres printer in a non-gui application.
Again, there does not seem to be any way around this.
NOTE: I've also added a catch to avoid going into loadXlfd() in the
fallback if we're not on the main thread, since this was missing.
Task-number: QTBUG-10448
Reviewed-by: Trond
Diffstat (limited to 'examples/declarative')
0 files changed, 0 insertions, 0 deletions