From e00d888daefbfbd5f17e0772421773f8e295087b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 2 Oct 2019 15:03:35 +0200 Subject: [PATCH 01/16] iOS: Prevent UIKit from adding UITextInteraction to our view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's added automatically when some languages such as Japanese are the active input language/keyboard, which results in UIKit triggering the edit menu for any tap in the UI, regardless of whether it hits the focus object or not. Adopting the protocol is a much larger effort and needs to be coordinated so that we still support text interaction on iOS versions pre 13.0. Even with this patch the UITextSelectionView will still blink its own cursor, which doesn't seem to sync up with the UITextInput protocol's view of where the cursor is. Fixes: QTBUG-78496 Change-Id: I61500ad7ab9c8577f71188c0c99ead39465e3839 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/quiview.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index e64c05d099..4e3657ec37 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -628,6 +628,18 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") #endif } +#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) +- (void)addInteraction:(id)interaction +{ + if (__builtin_available(iOS 13.0, *)) { + if ([interaction isKindOfClass:UITextInteraction.class]) + return; // Prevent iOS from adding UITextInteraction + } + + [super addInteraction:interaction]; +} +#endif + @end @implementation UIView (QtHelpers) From 3dd8f6dc34a1357018484158a5e91c3afc71ae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 27 Sep 2019 16:16:52 +0200 Subject: [PATCH 02/16] Schannel: no longer keep old ssl errors around when reusing socket And add a test for it so it can no longer happen in any current or future implementation. Change-Id: I3214aa90595e291b1e1c66befe185cfe1ea7bc6b Reviewed-by: Timur Pocheptsov --- src/network/ssl/qsslsocket_schannel.cpp | 3 +- .../network/ssl/qsslsocket/tst_qsslsocket.cpp | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp index 339ecf4da2..46c109b6e5 100644 --- a/src/network/ssl/qsslsocket_schannel.cpp +++ b/src/network/ssl/qsslsocket_schannel.cpp @@ -974,6 +974,7 @@ bool QSslSocketBackendPrivate::performHandshake() bool QSslSocketBackendPrivate::verifyHandshake() { Q_Q(QSslSocket); + sslErrors.clear(); const bool isClient = mode == QSslSocket::SslClientMode; #define CHECK_STATUS(status) \ @@ -1062,7 +1063,7 @@ bool QSslSocketBackendPrivate::verifyHandshake() } // verifyCertContext returns false if the user disconnected while it was checking errors. - if (certificateContext && sslErrors.isEmpty() && !verifyCertContext(certificateContext)) + if (certificateContext && !verifyCertContext(certificateContext)) return false; if (!checkSslErrors() || state != QAbstractSocket::ConnectedState) { diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 66475e55ad..79ea505d11 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -259,6 +259,8 @@ private slots: void disabledProtocols_data(); void disabledProtocols(); + void oldErrorsOnSocketReuse(); + void setEmptyDefaultConfiguration(); // this test should be last protected slots: @@ -4192,6 +4194,53 @@ void tst_QSslSocket::disabledProtocols() } } +void tst_QSslSocket::oldErrorsOnSocketReuse() +{ + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) + return; // not relevant + SslServer server; + server.protocol = QSsl::TlsV1_1; + server.m_certFile = testDataDir + "certs/fluke.cert"; + server.m_keyFile = testDataDir + "certs/fluke.key"; + QVERIFY(server.listen(QHostAddress::SpecialAddress::LocalHost)); + + QSslSocket socket; + socket.setProtocol(QSsl::TlsV1_1); + QList errorList; + auto connection = connect(&socket, QOverload &>::of(&QSslSocket::sslErrors), + [&socket, &errorList](const QList &errors) { + errorList += errors; + socket.ignoreSslErrors(errors); + socket.resume(); + }); + + socket.connectToHostEncrypted(QString::fromLatin1("localhost"), server.serverPort()); + QVERIFY(QTest::qWaitFor([&socket](){ return socket.isEncrypted(); })); + socket.disconnectFromHost(); + if (socket.state() != QAbstractSocket::UnconnectedState) { + QVERIFY(QTest::qWaitFor( + [&socket](){ + return socket.state() == QAbstractSocket::UnconnectedState; + })); + } + + auto oldList = errorList; + errorList.clear(); + server.close(); + server.m_certFile = testDataDir + "certs/bogus-client.crt"; + server.m_keyFile = testDataDir + "certs/bogus-client.key"; + QVERIFY(server.listen(QHostAddress::SpecialAddress::LocalHost)); + + socket.connectToHostEncrypted(QString::fromLatin1("localhost"), server.serverPort()); + QVERIFY(QTest::qWaitFor([&socket](){ return socket.isEncrypted(); })); + + for (const auto &error : oldList) { + QVERIFY2(!errorList.contains(error), + "The new errors should not contain any of the old ones"); + } +} + #endif // QT_NO_SSL QTEST_MAIN(tst_QSslSocket) From 45b76fc4eac1acd38a899753b115a89038a0de71 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 7 Oct 2019 13:08:33 +0200 Subject: [PATCH 03/16] eglfs/linuxfb: Add an env.var. to disable screen/cursor control By default we disable screen blank and hide the cursor. This is something inherited from Qt 4. Then reset to some default values when exiting. This is not ideal when the system is configured with kernel parameters like consoleblank=0 or vt.global_cursor_default=0. So have a way to skip all tty voodoo. On systems where relevant, one can now launch with QT_QPA_PRESERVE_CONSOLE_STATE=1 set. [ChangeLog][Platform Specific Changes][Linux] Added an environment variable QT_QPA_PRESERVE_CONSOLE_STATE that can be used to prevent Qt from altering the tty screen and cursor settings when running with platforms like linuxfb and eglfs. Task-number: QTBUG-61916 Change-Id: I0e84e53f2d5fca992a7d26d0280ba35e30523379 Reviewed-by: Eirik Aavitsland --- src/platformsupport/fbconvenience/qfbvthandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platformsupport/fbconvenience/qfbvthandler.cpp b/src/platformsupport/fbconvenience/qfbvthandler.cpp index 7bb9e28ac2..8aab0bada4 100644 --- a/src/platformsupport/fbconvenience/qfbvthandler.cpp +++ b/src/platformsupport/fbconvenience/qfbvthandler.cpp @@ -70,6 +70,10 @@ QT_BEGIN_NAMESPACE #ifdef VTH_ENABLED static void setTTYCursor(bool enable) { + static bool ignore = qEnvironmentVariableIntValue("QT_QPA_PRESERVE_CONSOLE_STATE"); + if (ignore) + return; + const char * const devs[] = { "/dev/tty0", "/dev/tty", "/dev/console", 0 }; int fd = -1; for (const char * const *dev = devs; *dev; ++dev) { From b7aaee002677caf411190bbc6ea7f18a28a71360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 7 Oct 2019 16:56:19 +0200 Subject: [PATCH 04/16] iOS: Remove assert when doing GL rendering in the background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-76961 Change-Id: If2212601dbb867dd7ceb826b867bb24d302f86df Reviewed-by: Volker Hilsheimer Reviewed-by: Timur Pocheptsov Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioscontext.mm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm index 535e7d7aa6..cecbb17039 100644 --- a/src/plugins/platforms/ios/qioscontext.mm +++ b/src/plugins/platforms/ios/qioscontext.mm @@ -332,11 +332,8 @@ bool QIOSContext::verifyGraphicsHardwareAvailability() ); }); - if (applicationBackgrounded) { - static const char warning[] = "OpenGL ES calls are not allowed while an application is backgrounded"; - Q_ASSERT_X(!applicationBackgrounded, "QIOSContext", warning); - qCWarning(lcQpaGLContext, warning); - } + if (applicationBackgrounded) + qCWarning(lcQpaGLContext, "OpenGL ES calls are not allowed while an application is backgrounded"); return !applicationBackgrounded; } From 4f88e0bbd1c014adc6db7a37e4754446c4c8f529 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 6 Oct 2019 21:14:58 -0700 Subject: [PATCH 05/16] Fix build: disable the HWRNG in bootstrapped mode qmake build fails: qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)': /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)' Fixes: QTBUG-78937 Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c Reviewed-by: Edward Welbourne --- src/corelib/tools/qsimd_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index d603631a24..397b0f55a6 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -346,7 +346,7 @@ extern Q_CORE_EXPORT QBasicAtomicInteger qt_cpu_features[2]; #endif Q_CORE_EXPORT quint64 qDetectCpuFeatures(); -#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) +#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND) && !defined(QT_BOOTSTRAPPED) Q_CORE_EXPORT qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW; #else static inline qsizetype qRandomCpu(void *, qsizetype) Q_DECL_NOTHROW From a0f145baab0080b335fa0a5be44472a3acda34e0 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 9 Oct 2019 17:37:11 +0200 Subject: [PATCH 06/16] Fix vertical advance for printing on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Y coordinate needed to be reversed to produce expected results. Fixes: QTBUG-69803 Change-Id: If349912cd078d17ce69d207c2ed35cf781c1a14d Reviewed-by: Michael Brüning --- src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 072dd1a28a..30c80ebd86 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -471,7 +471,7 @@ void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextIt const qreal firstY = positions[0].y.toReal(); for (int i = 0; i < glyphs.size(); ++i) { cgPositions[i].x = positions[i].x.toReal() - firstX; - cgPositions[i].y = positions[i].y.toReal() - firstY; + cgPositions[i].y = firstY - positions[i].y.toReal(); cgGlyphs[i] = glyphs[i]; } From da12c06b99ef1a41b0ee7f84516a928d1a625ba6 Mon Sep 17 00:00:00 2001 From: Francisco Boni Date: Fri, 11 Oct 2019 14:10:06 -0300 Subject: [PATCH 07/16] Fix build with ICC under IPO on Windows qmake.conf(25) incorrectly sets QMAKE_CFLAGS_DISABLE_LTCG to -Qno-ipo. The correct form to disable IPO on Windows with ICC 18.x and 19.x should be: -Qipo-. The implication is that the CONFIG feature in simd.prf (31) modulating the compilation of specific ISA optimized sources now successfully disables IPO on intel_icl when needed. Fixes: QTBUG-78976 Change-Id: Id691f69b909d2bbba77402ff4f0b17b3b07ad6f3 Reviewed-by: Allan Sandfeld Jensen --- mkspecs/win32-icc/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf index 3cb0d58824..857959dc98 100644 --- a/mkspecs/win32-icc/qmake.conf +++ b/mkspecs/win32-icc/qmake.conf @@ -22,7 +22,7 @@ QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_OPTIMIZE_DEBUG -Zi -MDd QMAKE_CFLAGS_UTF8_SOURCE = -Qoption,cpp,--unicode_source_kind,UTF-8 QMAKE_CFLAGS_LTCG = -Qipo -QMAKE_CFLAGS_DISABLE_LTCG = -Qno-ipo +QMAKE_CFLAGS_DISABLE_LTCG = -Qipo- QMAKE_CFLAGS_SSE2 = -QxSSE2 QMAKE_CFLAGS_SSE3 = -QxSSE3 From 6426a38d822344397755e653787891f6a6521d42 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 13 Aug 2019 20:33:11 -0700 Subject: [PATCH 08/16] Partially revert "qfloat16: suppress the tables if FP16 is supported by the CPU" This reverts the x86 F16 part of commit 9649c41ed950eaa7dd9d3cb6d37a05d3a9ed8a3e. Unfortunately, it is perfectly valid to compile coe without F16C an link to a QtCore that was compiled with it. That's the case in Clear Linux where there's /usr/lib64/libQt5Core.so.5 and /usr/lib4/haswell/libQt5Core.so.5. Change-Id: I907a43cd9a714da288a2fffd15baacace8331403 Reviewed-by: Jani Heikkinen --- src/tools/qfloat16-tables/gen_qfloat16_tables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp b/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp index 17fc978039..6f0997bc25 100644 --- a/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp +++ b/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp @@ -79,7 +79,7 @@ qint32 main(qint32 argc, char **argv) fid.write("#include \n\n"); fid.write("QT_BEGIN_NAMESPACE\n\n"); - fid.write("#if !defined(__F16C__) && !defined(__ARM_FP16_FORMAT_IEEE)\n\n"); + fid.write("#if !defined(__ARM_FP16_FORMAT_IEEE)\n\n"); fid.write("const quint32 qfloat16::mantissatable[2048] = {\n"); fid.write("0,\n"); @@ -156,7 +156,7 @@ qint32 main(qint32 argc, char **argv) fid.write("};\n\n"); - fid.write("#endif // !__F16C__ && !__ARM_FP16_FORMAT_IEEE\n\n"); + fid.write("#endif // !__ARM_FP16_FORMAT_IEEE\n\n"); fid.write("QT_END_NAMESPACE\n"); fid.close(); return 0; From ba328d2c7b742abebec957cf728a7eb8c40f7cb6 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 14 Oct 2019 09:44:06 +0200 Subject: [PATCH 09/16] Bump version Change-Id: Ib35c8cdf300926001e08d234bc8cc3a08af4985b --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index a4cd16555d..c3e87640c3 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -4,4 +4,4 @@ CONFIG += warning_clean QT_SOURCE_TREE = $$PWD QT_BUILD_TREE = $$shadowed($$PWD) -MODULE_VERSION = 5.13.1 +MODULE_VERSION = 5.13.2 From d3d5eadf2432ddc874eabbb2d2f56c4b9ff8830f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 14 Oct 2019 10:58:29 +0200 Subject: [PATCH 10/16] Fix assert in VS project generator We must check whether outputs or inputVars are non-empty before accessing them. This amends commit 68866b1a. Task-number: QTBUG-79178 Change-Id: Iecf6dc705bac9bef5133ae2e5ceeace5f859f175 Reviewed-by: Oliver Wolff --- qmake/generators/win32/msvc_vcproj.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index df4876ace7..51d8002324 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1569,12 +1569,14 @@ void VcprojGenerator::initExtraCompilerOutputs() if (!outputVar.isEmpty() && otherFilters.contains(outputVar)) continue; - QString tmp_out = project->first(outputs.first().toKey()).toQString(); + QString tmp_out; + if (!outputs.isEmpty()) + tmp_out = project->first(outputs.first().toKey()).toQString(); if (project->values(ProKey(*it + ".CONFIG")).indexOf("combine") != -1) { // Combined output, only one file result extraCompile.addFile(Option::fixPathToTargetOS( replaceExtraCompilerVariables(tmp_out, QString(), QString(), NoShell), false)); - } else { + } else if (!inputVars.isEmpty()) { // One output file per input const ProStringList &tmp_in = project->values(inputVars.first().toKey()); for (int i = 0; i < tmp_in.count(); ++i) { From c9eff4aa074823cbfbfc5e0240ba53f7e9141367 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 2 Oct 2019 08:46:21 +0200 Subject: [PATCH 11/16] iOS: Fix showing emoji characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In d5abda313dab0f83873d34b7c4ddbe8d8a06dacf, we started populating meta-fallback-fonts in the font database because some that are returned as fallbacks are not in the main list of fonts on the system, so we would exclude them, thinking they were non-existent. But populating these fonts by name does not always work, as the system explicitly forbids requesting meta-fonts by name for some cases. One of these was the emoji font, which would resolve to a incompatible font descriptor and support for emojis would be broken. The fix is to retain the font descriptors we get from the system instead, since these are guaranteed to be refer to the correct font. This also saves us an unnecessary round-trip. Task-number: QTBUG-78821 Task-number: QTBUG-77467 Change-Id: Icb17ccc75811eebf03919437828ba71f3ef08938 Reviewed-by: Tor Arne Vestbø --- .../fontdatabases/mac/qcoretextfontdatabase.mm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index e8ea194897..e78fb4e8e4 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -481,7 +481,12 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo for (int i = 0; i < numCascades; ++i) { CTFontDescriptorRef fontFallback = (CTFontDescriptorRef) CFArrayGetValueAtIndex(cascadeList, i); QCFString fallbackFamilyName = (CFStringRef) CTFontDescriptorCopyAttribute(fontFallback, kCTFontFamilyNameAttribute); - fallbackList.append(QString::fromCFString(fallbackFamilyName)); + + QString fallbackName = QString::fromCFString(fallbackFamilyName); + fallbackList.append(fallbackName); + + if (!qt_isFontFamilyPopulated(fallbackName)) + const_cast(this)->populateFromDescriptor(fontFallback, fallbackName); } // .Apple Symbols Fallback will be at the beginning of the list and we will @@ -494,15 +499,6 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo addExtraFallbacks(&fallbackList); - // Since iOS 13, the cascade list may contain meta-fonts which have not been - // populated to the database, such as ".AppleJapaneseFont". It is important that we - // include this in the fallback list, in order to get fallback support for all - // languages - for (const QString &fallback : fallbackList) { - if (!qt_isFontFamilyPopulated(fallback)) - const_cast(this)->populateFamily(fallback); - } - extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &); fallbackList = qt_sort_families_by_writing_system(script, fallbackList); From 90d94c1c2c3571d48c7b8c2d6ba98ae4a9a28f0b Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 7 Oct 2019 08:39:35 +0200 Subject: [PATCH 12/16] macOS: Fix regression with some characters in non-bundle apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .Noto Sans Univeral is a system-generated font, but for some undiscovered reason, it has different content when the app has a valid Info.plist versus when it does not. When there is no valid Info.plist, the font will act as a last-resort font and return a question mark glyph (index 4) for all characters it does not support. This was discovered with emojis, but I also verified that the font returns index 4 for a random character in the Cherokee range, in order to check if this was specific for emojis or not. This causes the font to take precedence over anything that follows it in the fallback list in apps that do not have a valid Info.plist, so it has to be at the end of the list. Note that in these apps, it will act as a last-resort font, so the glyphs returned for missing characters will be different from in a regular app bundle. But this seems safer than to exclude the font entirely, given that Noto Sans cover a large range of characters and might be needed. This font also refactors the look up of fonts to push to the end to avoid doing lots of unnecessary looping over the list. Fixes: QTBUG-78833 Change-Id: I38bec5d5941681c4b4586072f7811d31561e1051 Reviewed-by: Tor Arne Vestbø --- .../mac/qcoretextfontdatabase.mm | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index e78fb4e8e4..c450e91d49 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -478,6 +478,9 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo if (cascadeList) { QStringList fallbackList; const int numCascades = CFArrayGetCount(cascadeList); + + int symbolIndex = -1; + int notoSansUniversalIndex = -1; for (int i = 0; i < numCascades; ++i) { CTFontDescriptorRef fontFallback = (CTFontDescriptorRef) CFArrayGetValueAtIndex(cascadeList, i); QCFString fallbackFamilyName = (CFStringRef) CTFontDescriptorCopyAttribute(fontFallback, kCTFontFamilyNameAttribute); @@ -487,15 +490,28 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo if (!qt_isFontFamilyPopulated(fallbackName)) const_cast(this)->populateFromDescriptor(fontFallback, fallbackName); + + if (fallbackName == QLatin1String(".Apple Symbols Fallback")) + symbolIndex = fallbackList.size() - 1; + else if (fallbackName == QLatin1String(".Noto Sans Universal")) + notoSansUniversalIndex = fallbackList.size() - 1; } // .Apple Symbols Fallback will be at the beginning of the list and we will // detect that this has glyphs for Arabic and other writing systems. // Since it is a symbol font, it should be the last resort, so that // the proper fonts for these writing systems are preferred. - int symbolIndex = fallbackList.indexOf(QLatin1String(".Apple Symbols Fallback")); - if (symbolIndex >= 0) + if (symbolIndex >= 0) { fallbackList.move(symbolIndex, fallbackList.size() - 1); + if (notoSansUniversalIndex > symbolIndex) + --notoSansUniversalIndex; + } + + // .Noto Sans Universal appears to have a bug when the application + // does not have a valid Info.plist, which causes it to return glyph #4 + // (a question mark) for any character. + if (notoSansUniversalIndex >= 0) + fallbackList.move(notoSansUniversalIndex, fallbackList.size() - 1); addExtraFallbacks(&fallbackList); From 631efee29371246ba1a1d9d007b23ca08b867191 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 16 Oct 2019 12:35:11 +0200 Subject: [PATCH 13/16] iOS: Account for when the older SDK is used when building MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the pre-built versions of Qt at this point are still built against the iOS 12.x SDKs, then we need to account for this in order to have the workaround implemented in e00d888daefbfbd5f17e0772421773f8e295087b still working when deployed to an iOS 13 based device. Change-Id: I649a453c549ee272de64624d68f9382276fcba64 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/quiview.h | 5 +++++ src/plugins/platforms/ios/quiview.mm | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/ios/quiview.h b/src/plugins/platforms/ios/quiview.h index e1d5d5af0c..343f102971 100644 --- a/src/plugins/platforms/ios/quiview.h +++ b/src/plugins/platforms/ios/quiview.h @@ -70,3 +70,8 @@ QT_END_NAMESPACE @property (nonatomic, readonly) UIEdgeInsets qt_safeAreaInsets; @end +#if !QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) +@interface UITextInteraction : NSObject +@end +#endif + diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 4e3657ec37..962b1d929f 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -628,7 +628,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") #endif } -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) - (void)addInteraction:(id)interaction { if (__builtin_available(iOS 13.0, *)) { @@ -638,7 +637,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") [super addInteraction:interaction]; } -#endif @end From a254472a49a490d452b53663ec6c4914e910459d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 20 Sep 2019 14:28:49 +0200 Subject: [PATCH 14/16] Xcode: Ensure there's always a CFBundle[Short]Version[String] set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Leaving it empty resulted in errors from Xcode when compiling the app. Task-number: QTBUG-25309 Task-number: QTBUG-74872 Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d Reviewed-by: Joerg Bornemann (cherry picked from commit 1d1ed017119df2cd28a9e21aee0a8cece5282250) Reviewed-by: Tor Arne Vestbø --- mkspecs/features/mac/default_post.prf | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 26bd3e2e98..993f4d56a9 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -97,21 +97,22 @@ macx-xcode { qmake_pkginfo_typeinfo.value = "????" QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo - !isEmpty(VERSION) { - l = $$split(VERSION, '.') 0 0 # make sure there are at least three - VER_MAJ = $$member(l, 0, 0) - VER_MIN = $$member(l, 1, 1) - VER_PAT = $$member(l, 2, 2) - unset(l) + bundle_version = $$VERSION + isEmpty(bundle_version): bundle_version = 1.0.0 - qmake_full_version.name = QMAKE_FULL_VERSION - qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} - QMAKE_MAC_XCODE_SETTINGS += qmake_full_version + l = $$split(bundle_version, '.') 0 0 # make sure there are at least three + VER_MAJ = $$member(l, 0, 0) + VER_MIN = $$member(l, 1, 1) + VER_PAT = $$member(l, 2, 2) + unset(l) - qmake_short_version.name = QMAKE_SHORT_VERSION - qmake_short_version.value = $${VER_MAJ}.$${VER_MIN} - QMAKE_MAC_XCODE_SETTINGS += qmake_short_version - } + qmake_full_version.name = QMAKE_FULL_VERSION + qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} + QMAKE_MAC_XCODE_SETTINGS += qmake_full_version + + qmake_short_version.name = QMAKE_SHORT_VERSION + qmake_short_version.value = $${VER_MAJ}.$${VER_MIN} + QMAKE_MAC_XCODE_SETTINGS += qmake_short_version !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { debug_information_format.name = DEBUG_INFORMATION_FORMAT From c37af0ba2d886dcad15ec2baed2582c962c3c217 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Mon, 14 Oct 2019 10:28:55 +0300 Subject: [PATCH 15/16] Add changes file for Qt 5.13.2 Change-Id: Iaf3f96e6c0dc5786fc3dc8667952813e5aa366b2 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Laszlo Agocs Reviewed-by: Shawn Rutledge Reviewed-by: Eirik Aavitsland Reviewed-by: Timur Pocheptsov --- dist/changes-5.13.2 | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 dist/changes-5.13.2 diff --git a/dist/changes-5.13.2 b/dist/changes-5.13.2 new file mode 100644 index 0000000000..e23b5fdaa6 --- /dev/null +++ b/dist/changes-5.13.2 @@ -0,0 +1,69 @@ +Qt 5.13.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.13.0 through 5.13.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.13 series is binary compatible with the 5.12.x series. +Applications compiled for 5.12 will continue to run with 5.13. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* QtCore * +**************************************************************************** + + - Fixed a bug that made qErrnoWarning() say there was no error when + generating the error message. + + - QBitArray: + * Fixed two bugs that caused QBitArrays created using fromBits() not to + compare equal to the equivalent QBitArray created using other methods + if the size was zero or not a multiple of 4. If the size modulus 8 was + 5, 6, or 7, the data was actually incorrect. + + - QCryptographicHash: + * Fixed a bug that caused the SHA-3 and Keccak algorithms to crash if + passed 256 MB of data or more. + + - QObject: + * Fixed a resource leak caused by a race condition if multiple QObjects + were created at the same time, for the first time in an application, + from multiple threads (implies threads not started with QThread). + +**************************************************************************** +* QtGui * +**************************************************************************** + + - Text: + * [QTBUG-69546] Fixed a crash bug in + QTextDocument::clearUndoRedoStacks(QTextDocument::UndoStack). + +**************************************************************************** +* QtSQL * +**************************************************************************** + + - sqlite: + * Updated to v3.29.0 + +**************************************************************************** +* Platform-Specific Changes * +**************************************************************************** + + - Linux: + * [QTBUG-61916] Added an environment variable + QT_QPA_PRESERVE_CONSOLE_STATE that can be used to prevent Qt from + altering the tty screen and cursor settings when running with + platforms like linuxfb and eglfs. + + - Android: + * [QTBUG-76036] Fixed an issue where menus would not work on 64 bit + builds. From a7a24784eeba6747d319eb911583bdd99ef38cdb Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 25 Oct 2019 06:57:32 +0000 Subject: [PATCH 16/16] Revert "iOS: Account for when the older SDK is used when building" This reverts commit 631efee29371246ba1a1d9d007b23ca08b867191. Reason for revert: This causes a problem when running on iOS 11 devices. Change-Id: If5194989b8d7a9f4cf2d72e770fdaad754d7e236 Reviewed-by: Jani Heikkinen --- src/plugins/platforms/ios/quiview.h | 5 ----- src/plugins/platforms/ios/quiview.mm | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/ios/quiview.h b/src/plugins/platforms/ios/quiview.h index 343f102971..e1d5d5af0c 100644 --- a/src/plugins/platforms/ios/quiview.h +++ b/src/plugins/platforms/ios/quiview.h @@ -70,8 +70,3 @@ QT_END_NAMESPACE @property (nonatomic, readonly) UIEdgeInsets qt_safeAreaInsets; @end -#if !QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) -@interface UITextInteraction : NSObject -@end -#endif - diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 962b1d929f..4e3657ec37 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -628,6 +628,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") #endif } +#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(130000) - (void)addInteraction:(id)interaction { if (__builtin_available(iOS 13.0, *)) { @@ -637,6 +638,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") [super addInteraction:interaction]; } +#endif @end