summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-05-20 14:33:37 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-05-20 15:05:39 +0200
commitef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72 (patch)
tree0487783dec6fccc9b0d33db42330f3a957065677 /doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp
parent2c1d1c136102a17eef9ae3c4e9f0cf01338306ae (diff)
downloadqt4-tools-ef8cd7f2e68d6d34d70c3a12e82a67ed16b92b72.tar.gz
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 'doc/src/snippets/code/src_sql_kernel_qsqlquery.cpp')
0 files changed, 0 insertions, 0 deletions