Skip to content

Commit 5b4fc3e

Browse files
committed
depends: Fix Qt build with XCode 9.3
1 parent fb17fae commit 5b4fc3e

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

depends/packages/qt.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ $(package)_dependencies=openssl zlib
88
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
99
$(package)_build_subdir=qtbase
1010
$(package)_qt_libs=corelib network widgets gui plugins testlib
11-
$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch fix-cocoahelpers-macos.patch
11+
$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch
12+
$(package)_patches+=fix_qt_pkgconfig.patch fix-cocoahelpers-macos.patch qfixed-coretext.patch
1213

1314
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
1415
$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
@@ -141,6 +142,7 @@ define $(package)_preprocess_cmds
141142
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
142143
patch -p1 < $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
143144
patch -p1 < $($(package)_patch_dir)/fix-cocoahelpers-macos.patch && \
145+
patch -p1 < $($(package)_patch_dir)/qfixed-coretext.patch && \
144146
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
145147
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
146148
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23 Mon Sep 17 00:00:00 2001
2+
From: Gabriel de Dietrich <[email protected]>
3+
Date: Fri, 30 Mar 2018 11:58:16 -0700
4+
Subject: [PATCH] QCoreTextFontEngine: Fix build with Xcode 9.3
5+
6+
Apple LLVM version 9.1.0 (clang-902.0.39.1)
7+
8+
Error message:
9+
10+
.../qfontengine_coretext.mm:827:20: error: qualified reference to
11+
'QFixed' is a constructor name rather than a type in this context
12+
return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
13+
14+
Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043
15+
Reviewed-by: Konstantin Ritt <[email protected]>
16+
---
17+
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +-
18+
1 file changed, 1 insertion(+), 1 deletion(-)
19+
20+
diff --git old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
21+
index 25ff69d877d..98b753eff96 100644
22+
--- old/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
23+
+++ new/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
24+
@@ -824,7 +824,7 @@ void QCoreTextFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, gl
25+
26+
QFixed QCoreTextFontEngine::emSquareSize() const
27+
{
28+
- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
29+
+ return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
30+
}
31+
32+
QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
33+
--
34+
2.16.3

0 commit comments

Comments
 (0)