Merge remote-tracking branch 'origin/5.13.2' into 5.13

Change-Id: Ieb5afc87086758119bcfc8efbe355f5c0a93fc04
This commit is contained in:
Qt Forward Merge Bot 2019-10-30 06:52:03 +01:00
commit c51ca1d1b2
14 changed files with 186 additions and 39 deletions

View File

@ -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

69
dist/changes-5.13.2 vendored Normal file
View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -478,31 +478,43 @@ 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;
}
// .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);
// 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);
}
extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &);
fallbackList = qt_sort_families_by_writing_system(script, fallbackList);

View File

@ -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];
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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;

View File

@ -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<QSslError> errorList;
auto connection = connect(&socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors),
[&socket, &errorList](const QList<QSslError> &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)