From 37edacb7109ee1b81f4106e177913f23d86b47a3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 3 Aug 2011 14:50:40 +0200 Subject: QPlatformFontDatabase: Add default fonts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://codereview.qt.nokia.com/2567 Reviewed-by: Qt Sanity Bot Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qapplication.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/widgets') 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(); -- cgit v1.2.3