summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_x11.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-05-24 15:45:02 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-05-24 15:45:02 (GMT)
commit3003f1d885e732e7cc19f73f9733aa8102b70717 (patch)
tree283f16e0e918023f53fa9c35463cc57b025656a4 /src/gui/text/qfontdatabase_x11.cpp
parentaf84e21c40d3441546b22f631fc2d34a48580740 (diff)
parent1079096a57112d9615812771adba18d2e9297320 (diff)
downloadQt-3003f1d885e732e7cc19f73f9733aa8102b70717.zip
Qt-3003f1d885e732e7cc19f73f9733aa8102b70717.tar.gz
Qt-3003f1d885e732e7cc19f73f9733aa8102b70717.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/gui/text/qfontdatabase_x11.cpp')
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp
index 3b2e4e9..a7aa2ce 100644
--- a/src/gui/text/qfontdatabase_x11.cpp
+++ b/src/gui/text/qfontdatabase_x11.cpp
@@ -78,6 +78,9 @@ QT_BEGIN_NAMESPACE
extern double qt_pointSize(double pixelSize, int dpi);
extern double qt_pixelSize(double pointSize, int dpi);
+// from qapplication.cpp
+extern bool qt_is_gui_used;
+
static inline void capitalize (char *s)
{
bool space = true;
@@ -1938,7 +1941,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
} else if (X11->has_fontconfig) {
fe = loadFc(d, script, req);
- if (fe != 0 && fe->fontDef.pixelSize != req.pixelSize) {
+ if (fe != 0 && fe->fontDef.pixelSize != req.pixelSize && mainThread && qt_is_gui_used) {
QFontEngine *xlfdFontEngine = loadXlfd(d->screen, script, req);
if (xlfdFontEngine->fontDef.family == fe->fontDef.family) {
delete fe;
@@ -1950,7 +1953,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
#endif
- } else if (mainThread) {
+ } else if (mainThread && qt_is_gui_used) {
fe = loadXlfd(d->screen, script, req);
}
if (!fe) {