summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-30 06:52:03 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-30 06:52:03 +0100
commitc51ca1d1b232ce1d6eaa9c6dd85de127e825d3af (patch)
tree7fe1901da1b8272f8a07226fb67986b5b83bda39 /src
parentbe73bdc5d2491d036e5a6334dada453ed808dbc0 (diff)
parenta7a24784eeba6747d319eb911583bdd99ef38cdb (diff)
Merge remote-tracking branch 'origin/5.13.2' into 5.13
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qsimd_p.h2
-rw-r--r--src/network/ssl/qsslsocket_schannel.cpp3
-rw-r--r--src/platformsupport/fbconvenience/qfbvthandler.cpp4
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm36
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm2
-rw-r--r--src/plugins/platforms/ios/qioscontext.mm7
-rw-r--r--src/plugins/platforms/ios/quiview.mm12
-rw-r--r--src/tools/qfloat16-tables/gen_qfloat16_tables.cpp4
8 files changed, 48 insertions, 22 deletions
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<unsigned> 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
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/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) {
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index e8ea194897..c450e91d49 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -478,30 +478,42 @@ 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);
- fallbackList.append(QString::fromCFString(fallbackFamilyName));
+
+ QString fallbackName = QString::fromCFString(fallbackFamilyName);
+ fallbackList.append(fallbackName);
+
+ if (!qt_isFontFamilyPopulated(fallbackName))
+ const_cast<QCoreTextFontDatabase *>(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;
+ }
- addExtraFallbacks(&fallbackList);
+ // .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);
- // 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<QCoreTextFontDatabase *>(this)->populateFamily(fallback);
- }
+ addExtraFallbacks(&fallbackList);
extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &);
fallbackList = qt_sort_families_by_writing_system(script, fallbackList);
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];
}
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;
}
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<UIInteraction>)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)
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 <QtCore/qfloat16.h>\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;