summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-09-13 12:22:45 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 13:53:59 +0200
commitd959c37eaa66298579ca55440aff5fdb8b3126b2 (patch)
tree6c61938d1046fd2e469f63b49f3e58c4da449f88 /src/gui
parent7e2b238c507ee2fdea26f2b57512f337de2c5f85 (diff)
WinRT: Basic global support
Various global changes, primarily preprocessor flow, to support the WinRT platform. Change-Id: I3fa9cf91d5fb24019362e88fcf205e31b4f810b5 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/image.pri2
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index f29385d0a5..a80ab4a2fe 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -52,7 +52,7 @@ SOURCES += \
image/qiconengineplugin.cpp \
-win32: SOURCES += image/qpixmap_win.cpp
+win32:!winrt: SOURCES += image/qpixmap_win.cpp
# Built-in image format support
HEADERS += \
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 7f258331d3..b242a3cc68 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -907,12 +907,12 @@ static void init_platform(const QString &pluginArgument, const QString &platform
keys.join(QStringLiteral(", ")));
}
fatalMessage += QStringLiteral("Reinstalling the application may fix this problem.");
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
// Windows: Display message box unless it is a console application
// or debug build showing an assert box.
if (!QLibraryInfo::isDebugBuild() && !GetConsoleWindow())
MessageBox(0, (LPCTSTR)fatalMessage.utf16(), (LPCTSTR)(QCoreApplication::applicationName().utf16()), MB_OK | MB_ICONERROR);
-#endif // Q_OS_WIN && !Q_OS_WINCE
+#endif // Q_OS_WIN && !Q_OS_WINCE && !Q_OS_WINRT
qFatal("%s", qPrintable(fatalMessage));
return;
}
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 3586b3452a..824dbf7ae8 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -158,6 +158,9 @@ static const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
static inline bool winClearTypeFontsEnabled()
{
+#ifdef Q_OS_WINRT
+ return false;
+#else // Q_OS_WINRT
UINT result = 0;
#if !defined(SPI_GETFONTSMOOTHINGTYPE) // MinGW
# define SPI_GETFONTSMOOTHINGTYPE 0x200A
@@ -165,6 +168,7 @@ static inline bool winClearTypeFontsEnabled()
#endif
SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &result, 0);
return result == FE_FONTSMOOTHINGCLEARTYPE;
+#endif // !Q_OS_WINRT
}
/*!