summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-04-07 04:11:35 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-04-07 13:10:38 +0000
commit491b746473cf205cb08f64a2b1633a09d3c33ac4 (patch)
tree9ddb13fabbb8c58428edab30dea9650e325b0c2a /src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
parent3a845e4b4f308888ea1e3849d6bb03bccce99e43 (diff)
Fix build with -directwrite
There were several issues caught by GCC: * deleting object of polymorphic class type which has non-virtual destructor might cause undefined behaviour * comparison between signed and unsigned integer expressions * 'GetUserDefaultLocaleName' was not declared in this scope (depends on WINVER >= 0x0600) Change-Id: I39f2cc0d5e158f4d85377edd55e9f74a512c7303 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 85cd92b234..75449e22ed 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -33,6 +33,10 @@
#ifndef QT_NO_DIRECTWRITE
+#if WINVER < 0x0600
+# undef WINVER
+# define WINVER 0x0600
+#endif
#if _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
@@ -61,10 +65,14 @@ namespace {
class GeometrySink: public IDWriteGeometrySink
{
public:
- GeometrySink(QPainterPath *path) : m_path(path), m_refCount(0)
+ GeometrySink(QPainterPath *path)
+ : m_refCount(0), m_path(path)
{
Q_ASSERT(m_path != 0);
}
+ virtual ~GeometrySink()
+ {
+ }
IFACEMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *beziers, UINT bezierCount);
IFACEMETHOD_(void, AddLines)(const D2D1_POINT_2F *points, UINT pointCount);