diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-03-11 15:02:55 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-13 13:27:55 +0100 |
commit | 8bc026ddcc01234a17143402084a14454bd920f3 (patch) | |
tree | 6a81683004e2840ecf9ab8ff9ab07fdca7e543a7 /src/gui/text/qfontdatabase.cpp | |
parent | b9ec3e895f0af70bc78d8df64d3628d9b85fbec1 (diff) |
Ensure that QGuiApplication is inited before using QFontDatabase
Change-Id: I494c4fdfa49139316efac0f68f8d463c02056372
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 3c2cf4fdcf..02b9e6d25c 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1227,6 +1227,9 @@ QString QFontDatabase::styleString(const QFontInfo &fontInfo) */ QFontDatabase::QFontDatabase() { + if (!qApp || !QGuiApplicationPrivate::platformIntegration()) + qFatal("QFontDatabase: Must construct a QGuiApplication before accessing QFontDatabase"); + QMutexLocker locker(fontDatabaseMutex()); createDatabase(); d = privateDb(); |