summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-08-03 14:50:40 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-08-03 14:54:35 +0200
commit37edacb7109ee1b81f4106e177913f23d86b47a3 (patch)
treed06ee3db18ccef7705c391a2f4e9648d1aa502ae /src/widgets/kernel/qapplication.cpp
parent6c4dec7bff6f55b0c41729f4a4ab6962a037af15 (diff)
QPlatformFontDatabase: Add default fonts.
Add a default font accessor used to initalize QGuiApplication::font(). Add accessor for default font hash providing the defaults for QApplication::font(const char *widgetClassName). Change-Id: Ie4eb6edb251a81e81288ef480ae5550bd1125008 Reviewed-by: Samuel Rødal <sroedal@trolltech.com> Reviewed-on: http://codereview.qt.nokia.com/2567 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r--src/widgets/kernel/qapplication.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 0e1b691b36..f5cb04ce80 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -101,7 +101,8 @@
#include "qgesture.h"
#include "private/qgesturemanager_p.h"
-
+#include "private/qguiapplication_p.h"
+#include "qplatformfontdatabase_qpa.h"
#ifndef QT_NO_LIBRARY
#include "qlibrary.h"
#endif
@@ -514,7 +515,7 @@ PaletteHash *qt_app_palettes_hash()
return app_palettes();
}
-Q_GLOBAL_STATIC(FontHash, app_fonts)
+Q_GLOBAL_STATIC_WITH_INITIALIZER(FontHash, app_fonts, { *x = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->defaultFonts(); } )
FontHash *qt_app_fonts_hash()
{
return app_fonts();