From 76ae64abb54581a9bae27745d28aaf4dfb23a00c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 27 Mar 2012 17:05:53 +0200 Subject: [PATCH] Windows: Use native font engine by default. Turn around the meaning of the command line parameter. The FreeType engine can now be activated by passing freetype. Change-Id: I9da6cd4a127603f9cfb91f0ce8450088c0883faa Reviewed-by: Miikka Heikkinen Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsintegration.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index fa63d77dd7..47d6a2f11a 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -283,10 +283,11 @@ QPlatformFontDatabase *QWindowsIntegration::fontDatabase() const { if (!d->m_fontDatabase) { #ifndef QT_NO_FREETYPE - if (d->m_nativeInterface.property("fontengine").toString() == QLatin1String("native")) - d->m_fontDatabase = new QWindowsFontDatabase(); - else + const QVariant argument = d->m_nativeInterface.property("fontengine"); + if (argument.isValid() && argument.toString() == QLatin1String("freetype")) d->m_fontDatabase = new QWindowsFontDatabaseFT(); + else + d->m_fontDatabase = new QWindowsFontDatabase(); #else d->m_fontDatabase = new QWindowsFontDatabase(); #endif