diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-07 13:08:25 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-07 13:08:36 +0200 |
commit | 551f73bd8d745881e70a7808385f1a35c2d12b2a (patch) | |
tree | a082a94d64b5a8568143f34a0f00db374e188022 | |
parent | d1a22bd29856807805fa56608d2953c072df0cf1 (diff) | |
parent | a9db7290956f5674992233d792e6dfd312ec1e53 (diff) |
Merge "Merge remote-tracking branch 'origin/5.12.5' into 5.12"
-rw-r--r-- | dist/changes-5.12.5 | 109 | ||||
-rw-r--r-- | mkspecs/common/macx.conf | 2 | ||||
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 115 | ||||
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.h | 2 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 6 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 15 | ||||
-rw-r--r-- | tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp | 17 |
7 files changed, 211 insertions, 55 deletions
diff --git a/dist/changes-5.12.5 b/dist/changes-5.12.5 new file mode 100644 index 0000000000..c22839db78 --- /dev/null +++ b/dist/changes-5.12.5 @@ -0,0 +1,109 @@ +Qt 5.12.5 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.4. + +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.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +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 * +**************************************************************************** + + - 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. + + - QCborStreamReader: + * Fixed a bug that caused the QIODevice that the data was being read + from not to show the entire CBOR message as consumed. This allows the + user to consume data that may follow the CBOR payload. + + - 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). + + - QStorageInfo: + * Fixed a bug that caused QStorageInfo to be unable to report all + filesystems if the options to mounted filesystems were too long (over + 900 characters, roughly), such as those found in Docker overlay + mounts. + + - QTimeZone: + * The IANA timezone database backend now properly follows symlinks even + when they point to variable locations like /run or /var (useful when + /etc is mounted read-only). + +**************************************************************************** +* QtGui * +**************************************************************************** + + - QImage: + * Improve loading time when loading png files that have the same size as + the target. + + - QPixmapCache: + * [QTBUG-76694][QTBUG-72523] Ignore unsafe access from non-main threads + + - Text: + * [QTBUG-76219] Fixed a bug which could cause the font cache to grow + larger than it was supposed to. + * [QTBUG-55096][QTBUG-74761] Fixed bug where regular text rendered with + a color font would always display in black. + * [QTBUG-69546] Fixed a crash bug in + QTextDocument::clearUndoRedoStacks(QTextDocument::UndoStack). + +**************************************************************************** +* QtNetwork * +**************************************************************************** + + - QHostInfo: + * Functors used in the lookupHost overloads are now called correctly in + the thread of the context object. When used without context object, + the thread that initiates the lookup will run the functor, and is + required to run an event loop. + + - Windows: + * Correctly emit errors when trying to reach unreachable hosts or + services + +**************************************************************************** +* QtWidgets * +**************************************************************************** + + - QGraphicsView: + * Ignore disabled items when setting the mouse cursor. + + - QSplashScreen: + * On macOS, lower the splash screen when a modal dialog is shown to make + sure the user sees the dialog. + + - QSystemTrayIcon: + * On macOS, show the icon passed into showMessage in the notification + popup + +**************************************************************************** +* Android * +**************************************************************************** + + - [QTBUG-76293] Fix NDK r20 linking. + - [QTBUG-76036] Fixed an issue where menus would not work on 64 bit + builds. diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index 889027ada5..67552dcc6c 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -8,7 +8,7 @@ QMAKE_MAC_SDK = macosx QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12 QMAKE_APPLE_DEVICE_ARCHS = x86_64 QT_MAC_SDK_VERSION_MIN = 10.13 -QT_MAC_SDK_VERSION_MAX = 10.14 +QT_MAC_SDK_VERSION_MAX = 10.15 device.sdk = macosx device.target = device diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index d5994639b3..8f3eb738b4 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -514,6 +514,56 @@ static QList<QVariantMap> provisioningTeams() return flatTeams; } +bool ProjectBuilderMakefileGenerator::replaceLibrarySuffix(const QString &lib_file, + const ProString &opt, + QString &name, QString &library) +{ + /* This isn't real nice, but it is real useful. This looks in a prl + for what the library will ultimately be called so we can stick it + in the ProjectFile. If the prl format ever changes (not likely) then + this will not really work. However, more concerning is that it will + encode the version number in the Project file which might be a bad + things in days to come? --Sam + */ + if (lib_file.isEmpty()) + return false; + + QMakeMetaInfo libinfo; + if (!libinfo.readLib(lib_file) || libinfo.isEmpty("QMAKE_PRL_TARGET")) + return false; + + const QString libDir = fileInfo(lib_file).absolutePath(); + library = libDir + Option::dir_sep + libinfo.first("QMAKE_PRL_TARGET"); + + debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)", + opt.toLatin1().constData(), lib_file.toLatin1().constData(), library.toLatin1().constData()); + + if (project->isActiveConfig("xcode_dynamic_library_suffix")) { + QString suffixSetting = project->first("QMAKE_XCODE_LIBRARY_SUFFIX_SETTING").toQString(); + if (!suffixSetting.isEmpty()) { + QString librarySuffix = project->first("QMAKE_XCODE_LIBRARY_SUFFIX").toQString(); + suffixSetting = "$(" + suffixSetting + ")"; + if (!librarySuffix.isEmpty()) { + int pos = library.lastIndexOf(librarySuffix + '.'); + if (pos == -1) { + warn_msg(WarnLogic, "Failed to find expected suffix '%s' for library '%s'.", + qPrintable(librarySuffix), qPrintable(library)); + } else { + library.replace(pos, librarySuffix.length(), suffixSetting); + if (name.endsWith(librarySuffix)) + name.chop(librarySuffix.length()); + } + } else { + int pos = library.lastIndexOf(name); + if (pos != -1) + library.insert(pos + name.length(), suffixSetting); + } + } + } + + return true; +} + bool ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) { @@ -825,6 +875,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES + const ProStringList defaultLibDirs = project->values("QMAKE_DEFAULT_LIBDIRS"); ProStringList &libdirs = project->values("QMAKE_PBX_LIBPATHS"), &frameworkdirs = project->values("QMAKE_FRAMEWORKPATH"); static const char * const libs[] = { "LIBS", "LIBS_PRIVATE", @@ -832,6 +883,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) for (int i = 0; libs[i]; i++) { tmp = project->values(libs[i]); for(int x = 0; x < tmp.count();) { + bool libSuffixReplaced = false; bool remove = false; QString library, name; ProString opt = tmp[x]; @@ -844,49 +896,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString lib("lib" + name); for (ProStringList::Iterator lit = libdirs.begin(); lit != libdirs.end(); ++lit) { if(project->isActiveConfig("link_prl")) { - /* This isn't real nice, but it is real useful. This looks in a prl - for what the library will ultimately be called so we can stick it - in the ProjectFile. If the prl format ever changes (not likely) then - this will not really work. However, more concerning is that it will - encode the version number in the Project file which might be a bad - things in days to come? --Sam - */ - QString lib_file = QMakeMetaInfo::checkLib(Option::normalizePath( - (*lit) + Option::dir_sep + lib + Option::prl_ext)); - if (!lib_file.isEmpty()) { - QMakeMetaInfo libinfo; - if(libinfo.readLib(lib_file)) { - if(!libinfo.isEmpty("QMAKE_PRL_TARGET")) { - library = (*lit) + Option::dir_sep + libinfo.first("QMAKE_PRL_TARGET"); - debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)", - opt.toLatin1().constData(), lib_file.toLatin1().constData(), library.toLatin1().constData()); - remove = true; - - if (project->isActiveConfig("xcode_dynamic_library_suffix")) { - QString suffixSetting = project->first("QMAKE_XCODE_LIBRARY_SUFFIX_SETTING").toQString(); - if (!suffixSetting.isEmpty()) { - QString librarySuffix = project->first("QMAKE_XCODE_LIBRARY_SUFFIX").toQString(); - suffixSetting = "$(" + suffixSetting + ")"; - if (!librarySuffix.isEmpty()) { - int pos = library.lastIndexOf(librarySuffix + '.'); - if (pos == -1) { - warn_msg(WarnLogic, "Failed to find expected suffix '%s' for library '%s'.", - qPrintable(librarySuffix), qPrintable(library)); - } else { - library.replace(pos, librarySuffix.length(), suffixSetting); - if (name.endsWith(librarySuffix)) - name.chop(librarySuffix.length()); - } - } else { - int pos = library.lastIndexOf(name); - if (pos != -1) - library.insert(pos + name.length(), suffixSetting); - } - } - } - } - } - } + const QString prlFilePath = QMakeMetaInfo::checkLib( + Option::normalizePath((*lit) + Option::dir_sep + lib + + Option::prl_ext)); + if (replaceLibrarySuffix(prlFilePath, opt, name, library)) + remove = true; + libSuffixReplaced = true; } if(!remove) { QString extns[] = { ".dylib", ".so", ".a", QString() }; @@ -936,6 +951,16 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } if(!library.isEmpty()) { + if (!libSuffixReplaced) { + const QFileInfo fi = fileInfo(library); + const QString prlFilePath = QMakeMetaInfo::checkLib( + Option::normalizePath(fi.absolutePath() + '/' + fi.completeBaseName() + + Option::prl_ext)); + if (!prlFilePath.isEmpty()) { + name = fi.completeBaseName().mid(3); + replaceLibrarySuffix(prlFilePath, opt, name, library); + } + } const int slsh = library.lastIndexOf(Option::dir_sep); if(name.isEmpty()) { if(slsh != -1) @@ -943,8 +968,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } if(slsh != -1) { const QString path = QFileInfo(library.left(slsh)).absoluteFilePath(); - if(!path.isEmpty() && !libdirs.contains(path)) + if (!path.isEmpty() && !libdirs.contains(path) + && !defaultLibDirs.contains(path)) { libdirs += path; + } } library = fileFixify(library, FileFixifyFromOutdir | FileFixifyAbsolute); QString key = keyFor(library); diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h index f15c814cb4..a7b21a0dab 100644 --- a/qmake/generators/mac/pbuilder_pbx.h +++ b/qmake/generators/mac/pbuilder_pbx.h @@ -41,6 +41,8 @@ class ProjectBuilderMakefileGenerator : public UnixMakefileGenerator bool writeSubDirs(QTextStream &); bool writeMakeParts(QTextStream &); bool writeMakefile(QTextStream &) override; + bool replaceLibrarySuffix(const QString &lib_file, const ProString &opt, QString &name, + QString &library); QString pbxbuild(); QHash<QString, QString> keys; diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index abc37149a9..84f55ca689 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1202,8 +1202,10 @@ void UnixMakefileGenerator::init2() project->values("QMAKE_FRAMEWORK_VERSION").append(project->first("VER_MAJ")); if (project->first("TEMPLATE") == "aux") { - project->values("PRL_TARGET") = - project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB")); + project->values("PRL_TARGET") = { + project->first("QMAKE_PREFIX_STATICLIB") + + project->first("TARGET") + }; } else if (!project->values("QMAKE_APP_FLAG").isEmpty()) { if(!project->isEmpty("QMAKE_BUNDLE")) { ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION"); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 2da13289bf..a7834587b1 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -399,6 +399,7 @@ struct QBidiAlgorithm { analysis[i].bidiDirection = (level & 1) ? QChar::DirR : QChar::DirL; runHasContent = true; lastRunWithContent = -1; + ++isolatePairPosition; } int runBeforeIsolate = runs.size(); ushort newLevel = isRtl ? ((stack.top().level + 1) | 1) : ((stack.top().level + 2) & ~1); @@ -440,21 +441,19 @@ struct QBidiAlgorithm { doEmbed(true, true, false); break; case QChar::DirLRI: - Q_ASSERT(isolatePairs.at(isolatePairPosition).start == i); doEmbed(false, false, true); - ++isolatePairPosition; break; case QChar::DirRLI: - Q_ASSERT(isolatePairs.at(isolatePairPosition).start == i); doEmbed(true, false, true); - ++isolatePairPosition; break; case QChar::DirFSI: { - const auto &pair = isolatePairs.at(isolatePairPosition); - Q_ASSERT(pair.start == i); - bool isRtl = QStringView(text + pair.start + 1, pair.end - pair.start - 1).isRightToLeft(); + bool isRtl = false; + if (isolatePairPosition < isolatePairs.size()) { + const auto &pair = isolatePairs.at(isolatePairPosition); + Q_ASSERT(pair.start == i); + isRtl = QStringView(text + pair.start + 1, pair.end - pair.start - 1).isRightToLeft(); + } doEmbed(isRtl, false, true); - ++isolatePairPosition; break; } diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp index 9c477589f9..f0a32c2ed4 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -138,6 +138,7 @@ private slots: void noModificationOfInputString(); void superscriptCrash_qtbug53911(); void showLineAndParagraphSeparatorsCrash(); + void tooManyDirectionalCharctersCrash_qtbug77819(); private: QFont testFont; @@ -2309,5 +2310,21 @@ void tst_QTextLayout::nbspWithFormat() QCOMPARE(layout.lineAt(1).textLength(), s2.length() + 1 + s3.length()); } +void tst_QTextLayout::tooManyDirectionalCharctersCrash_qtbug77819() +{ + QString data; + data += QString::fromUtf8("\xe2\x81\xa8"); // U+2068 FSI character + data += QString::fromUtf8("\xe2\x81\xa7"); // U+2067 RLI character + + // duplicating the text + for (int i = 0; i < 10; i++) + data += data; + + // Nothing to test. It must not crash in beginLayout(). + QTextLayout tl(data); + tl.beginLayout(); + tl.endLayout(); +} + QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |