summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-05-16 10:22:47 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-22 07:59:49 +0200
commit4c9eb38390b35ee3ec0dc966e0b5036cac5ac76b (patch)
treeeab2f52d824bd698244cdb13e7d9e7b5d9ba1f79 /src/plugins/platforms/winrt/qwinrtfontdatabase.cpp
parent9d3b169bda1a48c6eee0820b6a2fd50d6dd6a023 (diff)
Support Windows Phone 8.1 in WinRT QPA
- Unsupported code paths for WP8.0 are avoided, and new APIs are used where appropriate (virtual keyboard) - DirectWrite fonts are loaded on WP8.1 - Platform dialogs are used on WP8.1 Change-Id: I721006ac943ad4e248f0f1590ce247a03e40fbc0 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtfontdatabase.cpp')
-rw-r--r--src/plugins/platforms/winrt/qwinrtfontdatabase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp b/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp
index 70bb9469db..7de223bbed 100644
--- a/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp
+++ b/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp
@@ -44,13 +44,13 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
-#ifndef Q_OS_WINPHONE
+#ifdef QT_WINRT_USE_DWRITE
#include <QtCore/QUuid>
#include <QtGui/private/qfontengine_ft_p.h>
#include <dwrite_1.h>
#include <wrl.h>
using namespace Microsoft::WRL;
-#endif // !Q_OS_WINPHONE
+#endif // QT_WINRT_USE_DWRITE
QT_BEGIN_NAMESPACE
@@ -62,7 +62,7 @@ QString QWinRTFontDatabase::fontDir() const
const QString applicationDirPath = QCoreApplication::applicationDirPath();
fontDirectory = applicationDirPath + QLatin1String("/fonts");
if (!QFile::exists(fontDirectory)) {
-#ifndef Q_OS_WINPHONE
+#ifdef QT_WINRT_USE_DWRITE
if (m_fontFamilies.isEmpty())
#endif
qWarning("No fonts directory found in application package.");
@@ -72,7 +72,7 @@ QString QWinRTFontDatabase::fontDir() const
return fontDirectory;
}
-#ifndef Q_OS_WINPHONE
+#ifdef QT_WINRT_USE_DWRITE
QWinRTFontDatabase::~QWinRTFontDatabase()
{
@@ -398,6 +398,6 @@ void QWinRTFontDatabase::releaseHandle(void *handle)
QBasicFontDatabase::releaseHandle(handle);
}
-#endif // !Q_OS_WINPHONE
+#endif // QT_WINRT_USE_DWRITE
QT_END_NAMESPACE