diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-26 10:25:14 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-11-26 10:25:14 +0000 |
commit | d34be3243419246d3b4966f6be8e345747723184 (patch) | |
tree | 4ac7a8698d0a30f17f3b8f542a1f88a1fe977aa4 | |
parent | 011aeb131ed904d948b69d6444ff58cdbfd4990c (diff) | |
parent | bce25a6340309938e06222663c2c7758bafab6e2 (diff) | |
download | qtbase-d34be3243419246d3b4966f6be8e345747723184.tar.gz |
Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8
-rw-r--r-- | dist/changes-5.7.1 | 221 | ||||
-rw-r--r-- | mkspecs/android-clang/qmake.conf | 1 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 9 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 9 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 24 | ||||
-rw-r--r-- | src/corelib/json/qjsonparser.cpp | 5 | ||||
-rw-r--r-- | src/corelib/json/qjsonparser_p.h | 5 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimedatabase.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qdatetimeparser_p.h | 84 | ||||
-rw-r--r-- | src/gui/painting/qcoregraphics.mm | 7 | ||||
-rw-r--r-- | src/gui/painting/qcoregraphics_p.h | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenuitem.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowskeymapper.cpp | 3 | ||||
-rw-r--r-- | src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 2 |
16 files changed, 313 insertions, 67 deletions
diff --git a/dist/changes-5.7.1 b/dist/changes-5.7.1 new file mode 100644 index 0000000000..83065f01c1 --- /dev/null +++ b/dist/changes-5.7.1 @@ -0,0 +1,221 @@ +Qt 5.7.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.7.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.7 series is binary compatible with the 5.6.x series. +Applications compiled for 5.6 will continue to run with 5.7. + +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. + +This release contains all fixes included in the Qt 5.6.2 release. + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + + - [QTBUG-45031] The NSURLConnection backend of QNetworkAccessManager has + been removed, since SecureTransport is the default SSL backend on iOS + and is enabled by default. This means that building with -no-openssl + -no-securetransport will no longer provide SSL capabilities on iOS. + + - QtCore / QDataStream: + * [QTBUG-54022] Incomplete reads of Qt containers are now handled same + way as for primitive types, meaning that previous errors are latched. + +**************************************************************************** +* Library * +**************************************************************************** + +QtCore +------ + + - QLockFile: + * Fixed permissions on lock files on Unix to allow for adjustments via + umask. + + - QMimeType: + * [QTBUG-50776] QMimeType::comment() now uses the default locale rather + than system locale, so that applications can control which language is + being used. + + - QUrl: + * QUrl::resolved() no longer treats a URL with a scheme as a relative URL + if it matches this URL's scheme. For now it still treats "file:name.txt" + as relative for compatibility, but be warned that in Qt 5.8 it will no + longer consider those to be relative. Both isRelative() and RFC 3986 say + that such URLs are not relative, so starting from Qt 5.8, resolved() will + return them as is. + + - QXmlStreamReader: + * Fixed a bug in the XML parser that prevented to load XML that + contained invalid characters for XML 1.0. + + - QXmlStreamWriter: + * Fixed a bug that prevented the generation of valid XML files when + using encoding with 8 bit per character but not ASCII compatible. + QXMLStreamWriter generated XML markup using always ASCII in this case. + +QtGui +----- + + - QGuiApplication: + * [QTBUG-51703] Fixed a bug that would cause QGuiApplication::sync() to + be left undefined for Qt builds without session management support. + + - QIconLoaderEngine: + * Fixed theme lookup for scalable entries + + - QTextDocument: + * [QTBUG-48182] Fixed a bug that would return a wrong position when + searching backward from the end of the document. + + - Text: + * [QTBUG-49452] Fixed a performance regression in Freetype engine that + was introduced in Qt 5.5. + * [QTBUG-53911] Fixed a crash that could happen if you were doing many + different text layouts with different fonts and superscript or + subscript alignment. + * [QTBUG-42033] Fixed bug where a QTextLayout with + ShowLineAndParagraphSeparators would modify the layout's input string. + * [QTBUG-54180] Fixed performance regression when rapidly switching + between a large set of fonts. + +QtNetwork +--------- + +- QSslSocket: + * [QTBUG-55170] Fixed a bug in SecureTransport backend that would cause + a memory usage growth in case 'readBufferMaxSize' is set. + * [QTBUG-52975] Fixed a bug in SecureTransport backend where transmit + was using invalid SSL context and reporting (incorrectly) some irrelevant + errors as a result. + +QtSql +----- + + - [QTBUG-53969][QTBUG-53237] Fixed QSqlQuery::prepare value truncation + error when using UNSIGNED values in a MySQL database. + +QtWidgets +--------- + + - QAbstractItemDelegate: + * [QTBUG-16469] Show localized detailed tooltips and "What's this?" + texts. + + - QTreeView: + * [QTBUG-52793] Fixed a key navigation bug when the columns were + reordered. + +**************************************************************************** +* Platform-specific Changes * +**************************************************************************** + +Android +------- + + - [QTBUG-50724] Added support for clang compiler + - [QTBUG-53511] Fixed CJK font resolution on Android 7. + +FreeBSD +------- + + - The freebsd-g++ mkspec was moved back and no longer requires the + "unsupported/" prefix, matching the FreeBSD ports tree, as FreeBSD 9.3 + still defaults to using GCC. Users of GCC that did not previously use + the ports patch will need to adapt their build scripts and drop the + "unsupported/" prefix. + +Linux +----- + +- [QTBUG-54733] It is now possible to opt out from installing signal + handlers when running with eglfs and linuxfb by setting the + QT_QPA_NO_SIGNAL_HANDLER environment variable to a non-zero value. +- [QTBUG-55140] xcb with EGL and OpenGL ES, as well as eglfs with the + eglfs_x11 backend, are now supported on DRIVE CX boards when using the + linux-drive-cx-g++ device spec. + + +Windows +------- + + - [QTBUG-41186] QWindow::fromWinId() may return 0 when passing invalid + window handles. + - [QTBUG-55595] Fixed crash when loading color fonts from data. + - [QTBUG-55097] Fixed rendering Adobe/Mozilla format color fonts with + other colors than black after Windows 10 Anniversary update. + - [QTBUG-54494] Fixed stretch when combined with either no or vertical + hinting preference or a device pixel ratio different from 1. + - [QTBUG-51024] Fixed height of text bounding box when using no or + vertical hinting preference, or when the device pixel ratio is + different from 1. + +**************************************************************************** +* Tools * +**************************************************************************** + +configure & build system +------------------------ + + - [QTBUG-35886][QTBUG-51417] Fixed Fontconfig vs. system FreeType + configuration. + - [QTBUG-43784][X11] Fixed detection of GLX with -qt-xcb. + - [QTBUG-51534][Windows] The configure.exe bootstrapping now prefers + cl over clang-cl, to avoid header incompatibility problems. + - [QTBUG-52940] Fixed missing plugins.qmltypes files in static builds. + - [QTBUG-52951] Fixed dynamic library support detection for platforms + without libdl. + - [QTBUG-53038] Fixed running of configure tests outside qtbase when + cross compiling on Windows (for example for Android). + - [QTBUG-53312] The flags supplied by the configure -D/-I/-L/-l options + are now applied after Qt's own flags. This helps in some cases when + the provided paths contain files which conflict with the Qt build. + - [QTBUG-53926] Fixed linkage of QML plugins in static prefix builds. + - [QTBUG-55011][Unix] Fixed -no-pkg-config being ignored by some + configure tests, which led to build failures later on. + - Fixed configure tests outside qtbase when $MAKEFLAGS contains the + -i flag. + - [Android] Some unused plugins are not built anymore. + - [MinGW] Added support for -separate-debug-info. + - [Unix] Added configure -no-opengles3 option. + - [Unix] Fixed MySQL detection/use on RHEL 6.6. + +qmake +----- + + - [QTBUG-41830] Fixed nested custom functions inheriting their callers' + arguments. + - [QTBUG-53895][MSVC] Started using separate PDB files for compiling + and linking. + - [QTBUG-54036][Darwin] Fixed installation of debug symbols. + - [QTBUG-54299] Various QMAKE_EXTRA_COMPILERS' .depends entries are now + appended to rather than overwritten. + - [QTBUG-54346][MSys/Apple] Fixed detection of QMAKE_DEFAULT_{INC,LIB}DIRS. + - [QTBUG-54550] Fixed access to freed memory in $$absolute_path(). + - [QTBUG-54674] The obsolete -target xp is now properly rejected. + - [QTBUG-55183][nmake] _WINDLL is now automatically defined when building + a DLL, consistently with Visual Studio. + - [QTBUG-55505] Fixed build of projects with spaces in the source or build + path against static builds of Qt. + - [QTBUG-55649][QTBUG-55915][Xcode] Fixed support for Xcode 8. + - [QTBUG-56162][MinGW] Fixed -release -force-debug-info missing both + optimization and debug info. + - Fixed several cases where the error() function would not abort qmake. + - Interrupting a command run via system() will now abort qmake as well. + - The packagesExist() function will now warn when used when Qt was + configured with -no-pkg-config. + - [Android] The default compiler flags were adjusted to match newer + NDK versions. + - [Darwin] Fixed detection of QMAKE_DEFAULT_INCDIRS. + - [Darwin][make] Added support for building Xcode asset catalogs. diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf index c33bbe7eed..3e621c7d77 100644 --- a/mkspecs/android-clang/qmake.conf +++ b/mkspecs/android-clang/qmake.conf @@ -6,6 +6,7 @@ QMAKE_COMPILER = gcc clang llvm CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings include(../common/linux.conf) +include(../common/gcc-base-unix.conf) include(../common/clang.conf) include(../common/android-base-head.conf) diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 382b10c37b..e3d76cd76e 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -308,7 +308,12 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) { t << "first: all\n"; t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) - << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n"; + << ' ' << depVar("ALL_DEPS"); + if (project->first("TEMPLATE") == "aux") { + t << "\n\n"; + return; + } + t << " $(DESTDIR_TARGET)\n\n"; t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS"); if(!project->isEmpty("QMAKE_PRE_LINK")) t << "\n\t" <<var("QMAKE_PRE_LINK"); @@ -318,7 +323,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) } else { t << "\n\t" << objectsLinkLine << " " ; } - } else if (project->first("TEMPLATE") != "aux") { + } else { t << "\n\t$(LINKER) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) " << objectsLinkLine << " $(LIBS)"; } if(!project->isEmpty("QMAKE_POST_LINK")) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 1739f66453..3a4f6242b2 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -517,7 +517,12 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "first: all\n"; t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) - << ' ' << depVar("ALL_DEPS") << " $(DESTDIR_TARGET)\n\n"; + << ' ' << depVar("ALL_DEPS"); + if (templateName == "aux") { + t << "\n\n"; + return; + } + t << " $(DESTDIR_TARGET)\n\n"; t << "$(DESTDIR_TARGET): " << depVar("PRE_TARGETDEPS") << " $(OBJECTS) " << depVar("POST_TARGETDEPS"); if(!project->isEmpty("QMAKE_PRE_LINK")) @@ -526,7 +531,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "\n\t$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n\t " << "$(OBJECTS)" << "\n<<"; - } else if (templateName != "aux") { + } else { const bool embedManifest = ((templateName == "app" && project->isActiveConfig("embed_manifest_exe")) || (templateName == "lib" && project->isActiveConfig("embed_manifest_dll") && !(project->isActiveConfig("plugin") && project->isActiveConfig("no_plugin_manifest")) diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index af9fe520f1..48df4ff916 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -568,16 +568,18 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "####### Build rules\n\n"; writeBuildRulesPart(t); - if(project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) { - const ProStringList &dlldirs = project->values("DLLDESTDIR"); - for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { - t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) " - << escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl; + if (project->first("TEMPLATE") != "aux") { + if (project->isActiveConfig("shared") && !project->values("DLLDESTDIR").isEmpty()) { + const ProStringList &dlldirs = project->values("DLLDESTDIR"); + for (ProStringList::ConstIterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) { + t << "\t-$(COPY_FILE) $(DESTDIR_TARGET) " + << escapeFilePath(Option::fixPathToTargetOS((*dlldir).toQString(), false)) << endl; + } } - } - t << endl; + t << endl; - writeRcFilePart(t); + writeRcFilePart(t); + } writeMakeQmake(t); @@ -601,8 +603,10 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS"); for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) { const ProStringList &inputs = project->values(ProKey(*it + ".input")); - for (ProStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) - t << escapeFilePath(*input) << ' '; + for (ProStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) { + const ProStringList &val = project->values((*input).toKey()); + t << escapeFilePaths(val).join(' ') << ' '; + } } } t << endl << endl; diff --git a/src/corelib/json/qjsonparser.cpp b/src/corelib/json/qjsonparser.cpp index 0eb0d21ecf..39738b90a8 100644 --- a/src/corelib/json/qjsonparser.cpp +++ b/src/corelib/json/qjsonparser.cpp @@ -500,9 +500,10 @@ namespace { memcpy(newValues, data, size*sizeof(QJsonPrivate::Value)); data = newValues; } else { - data = static_cast<QJsonPrivate::Value *>(realloc(data, alloc*sizeof(QJsonPrivate::Value))); - if (!data) + void *newValues = realloc(data, alloc * sizeof(QJsonPrivate::Value)); + if (!newValues) return false; + data = static_cast<QJsonPrivate::Value *>(newValues); } return true; } diff --git a/src/corelib/json/qjsonparser_p.h b/src/corelib/json/qjsonparser_p.h index afa2c1a8cf..379256847f 100644 --- a/src/corelib/json/qjsonparser_p.h +++ b/src/corelib/json/qjsonparser_p.h @@ -108,11 +108,12 @@ private: inline int reserveSpace(int space) { if (current + space >= dataLength) { dataLength = 2*dataLength + space; - data = (char *)realloc(data, dataLength); - if (!data) { + char *newData = (char *)realloc(data, dataLength); + if (!newData) { lastError = QJsonParseError::DocumentTooLarge; return -1; } + data = newData; } int pos = current; current += space; diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp index f786b2ae03..448e6117b1 100644 --- a/src/corelib/mimetypes/qmimedatabase.cpp +++ b/src/corelib/mimetypes/qmimedatabase.cpp @@ -264,7 +264,7 @@ bool QMimeDatabasePrivate::inherits(const QString &mime, const QString &parent) \code <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> - <mime-type type="application/vnd.nokia.qt.qmakeprofile"> + <mime-type type="application/vnd.qt.qmakeprofile"> <comment xml:lang="en">Qt qmake Profile</comment> <glob pattern="*.pro" weight="50"/> </mime-type> diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index f784aa13fc..a642358770 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -3835,7 +3835,7 @@ QString QDateTime::toString(Qt::DateFormat format) const \li the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses the system locale to localize the name, i.e. QLocale::system(). \row \li dddd - \li the long localized day name (e.g. 'Monday' to 'Qt::Sunday'). + \li the long localized day name (e.g. 'Monday' to 'Sunday'). Uses the system locale to localize the name, i.e. QLocale::system(). \row \li M \li the month as number without a leading zero (1-12) \row \li MM \li the month as number with a leading zero (01-12) diff --git a/src/corelib/tools/qdatetimeparser_p.h b/src/corelib/tools/qdatetimeparser_p.h index 6f381965a9..bc088a5f4c 100644 --- a/src/corelib/tools/qdatetimeparser_p.h +++ b/src/corelib/tools/qdatetimeparser_p.h @@ -104,14 +104,6 @@ public: none.zeroesAdded = 0; } virtual ~QDateTimeParser() {} - enum AmPmFinder { - Neither = -1, - AM = 0, - PM = 1, - PossibleAM = 2, - PossiblePM = 3, - PossibleBoth = 4 - }; enum Section { NoSection = 0x00000, @@ -187,33 +179,44 @@ public: #ifndef QT_NO_DATESTRING StateNode parse(QString &input, int &cursorPosition, const QDateTime ¤tValue, bool fixup) const; #endif - int sectionMaxSize(int index) const; - int sectionSize(int index) const; - int sectionMaxSize(Section s, int count) const; - int sectionPos(int index) const; - int sectionPos(const SectionNode &sn) const; - - const SectionNode §ionNode(int index) const; - Section sectionType(int index) const; - QString sectionText(int sectionIndex) const; - QString sectionText(const QString &text, int sectionIndex, int index) const; - int getDigit(const QDateTime &dt, int index) const; - bool setDigit(QDateTime &t, int index, int newval) const; - int parseSection(const QDateTime ¤tValue, int sectionIndex, QString &txt, int &cursorPosition, - int index, QDateTimeParser::State &state, int *used = 0) const; - int absoluteMax(int index, const QDateTime &value = QDateTime()) const; - int absoluteMin(int index) const; bool parseFormat(const QString &format); #ifndef QT_NO_DATESTRING bool fromString(const QString &text, QDate *date, QTime *time) const; #endif + enum FieldInfoFlag { + Numeric = 0x01, + FixedWidth = 0x02, + AllowPartial = 0x04, + Fraction = 0x08 + }; + Q_DECLARE_FLAGS(FieldInfo, FieldInfoFlag) + + FieldInfo fieldInfo(int index) const; + + void setDefaultLocale(const QLocale &loc) { defaultLocale = loc; } + virtual QString displayText() const { return text; } + +private: + int sectionMaxSize(Section s, int count) const; + QString sectionText(const QString &text, int sectionIndex, int index) const; + int parseSection(const QDateTime ¤tValue, int sectionIndex, QString &txt, int &cursorPosition, + int index, QDateTimeParser::State &state, int *used = 0) const; #ifndef QT_NO_TEXTDATE int findMonth(const QString &str1, int monthstart, int sectionIndex, QString *monthName = 0, int *used = 0) const; int findDay(const QString &str1, int intDaystart, int sectionIndex, QString *dayName = 0, int *used = 0) const; #endif + + enum AmPmFinder { + Neither = -1, + AM = 0, + PM = 1, + PossibleAM = 2, + PossiblePM = 3, + PossibleBoth = 4 + }; AmPmFinder findAmPm(QString &str, int index, int *used = 0) const; bool potentialValue(const QStringRef &str, int min, int max, int index, const QDateTime ¤tValue, int insert) const; @@ -223,36 +226,37 @@ public: return potentialValue(QStringRef(&str), min, max, index, currentValue, insert); } +protected: // for the benefit of QDateTimeEditPrivate + int sectionSize(int index) const; + int sectionMaxSize(int index) const; + int sectionPos(int index) const; + int sectionPos(const SectionNode &sn) const; + + const SectionNode §ionNode(int index) const; + Section sectionType(int index) const; + QString sectionText(int sectionIndex) const; + int getDigit(const QDateTime &dt, int index) const; + bool setDigit(QDateTime &t, int index, int newval) const; + + int absoluteMax(int index, const QDateTime &value = QDateTime()) const; + int absoluteMin(int index) const; + bool skipToNextSection(int section, const QDateTime ¤t, const QStringRef §ionText) const; bool skipToNextSection(int section, const QDateTime ¤t, const QString §ionText) const { return skipToNextSection(section, current, QStringRef(§ionText)); } - QString stateName(State s) const; - - enum FieldInfoFlag { - Numeric = 0x01, - FixedWidth = 0x02, - AllowPartial = 0x04, - Fraction = 0x08 - }; - Q_DECLARE_FLAGS(FieldInfo, FieldInfoFlag) - - FieldInfo fieldInfo(int index) const; - - void setDefaultLocale(const QLocale &loc) { defaultLocale = loc; } virtual QDateTime getMinimum() const; virtual QDateTime getMaximum() const; virtual int cursorPosition() const { return -1; } - virtual QString displayText() const { return text; } virtual QString getAmPmText(AmPm ap, Case cs) const; virtual QLocale locale() const { return defaultLocale; } mutable int currentSectionIndex; Sections display; /* - This stores the stores the most recently selected day. + This stores the most recently selected day. It is useful when considering the following scenario: 1. Date is: 31/01/2000 @@ -272,9 +276,7 @@ public: QString displayFormat; QLocale defaultLocale; QVariant::Type parserType; - bool fixday; - Qt::TimeSpec spec; // spec if used by QDateTimeEdit Context context; }; diff --git a/src/gui/painting/qcoregraphics.mm b/src/gui/painting/qcoregraphics.mm index 6af12c19d8..466b18d59b 100644 --- a/src/gui/painting/qcoregraphics.mm +++ b/src/gui/painting/qcoregraphics.mm @@ -146,13 +146,16 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm) return nsImage; } -NSImage *qt_mac_create_nsimage(const QIcon &icon) +NSImage *qt_mac_create_nsimage(const QIcon &icon, int defaultSize) { if (icon.isNull()) return nil; NSImage *nsImage = [[NSImage alloc] init]; - foreach (QSize size, icon.availableSizes()) { + QList<QSize> availableSizes = icon.availableSizes(); + if (availableSizes.isEmpty() && defaultSize > 0) + availableSizes << QSize(defaultSize, defaultSize); + foreach (QSize size, availableSizes) { QPixmap pm = icon.pixmap(size); QImage image = pm.toImage(); CGImageRef cgImage = qt_mac_toCGImage(image); diff --git a/src/gui/painting/qcoregraphics_p.h b/src/gui/painting/qcoregraphics_p.h index ab2579387e..065910222d 100644 --- a/src/gui/painting/qcoregraphics_p.h +++ b/src/gui/painting/qcoregraphics_p.h @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE #ifdef Q_OS_MACOS Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QPixmap &pm); -Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QIcon &icon); +Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QIcon &icon, int defaultSize = 0); Q_GUI_EXPORT QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size); #endif Q_GUI_EXPORT CGImageRef qt_mac_toCGImage(const QImage &qImage); diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 246b9a7bad..6d5b2400f1 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1654,7 +1654,7 @@ void QNetworkAccessManagerPrivate::_q_networkSessionClosed() QObject::disconnect(networkSession.data(), SIGNAL(closed()), q, SLOT(_q_networkSessionClosed())); QObject::disconnect(networkSession.data(), SIGNAL(stateChanged(QNetworkSession::State)), q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State))); - QObject::disconnect(networkSessionStrongRef.data(), SIGNAL(error(QNetworkSession::SessionError)), + QObject::disconnect(networkSession.data(), SIGNAL(error(QNetworkSession::SessionError)), q, SLOT(_q_networkSessionFailed(QNetworkSession::SessionError))); networkSessionStrongRef.clear(); diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index b8a64641a8..e32ff26ff5 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -360,7 +360,7 @@ NSMenuItem *QCocoaMenuItem::sync() NSImage *img = nil; if (!m_icon.isNull()) { - img = qt_mac_create_nsimage(m_icon); + img = qt_mac_create_nsimage(m_icon, m_iconSize); [img setSize:NSMakeSize(m_iconSize, m_iconSize)]; } [m_native setImage:img]; diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index b8c4f0b736..00c4a6191e 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -837,6 +837,9 @@ bool QWindowsKeyMapper::translateKeyEvent(QWindow *widget, HWND hwnd, bool QWindowsKeyMapper::translateMultimediaKeyEventInternal(QWindow *window, const MSG &msg) { #if defined(WM_APPCOMMAND) + // QTBUG-57198, do not send mouse-synthesized commands as key events in addition + if (GET_DEVICE_LPARAM(msg.lParam) == FAPPCOMMAND_MOUSE) + return false; const int cmd = GET_APPCOMMAND_LPARAM(msg.lParam); const int dwKeys = GET_KEYSTATE_LPARAM(msg.lParam); int state = 0; diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp index eb2bddd0bd..0bea9ebfa1 100644 --- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp @@ -1624,7 +1624,7 @@ QString QMYSQLDriver::formatValue(const QSqlField &field, bool trimStrings) cons Q_D(const QMYSQLDriver); QString r; if (field.isNull()) { - r = QLatin1String("NULL"); + r = QStringLiteral("NULL"); } else { switch(field.type()) { case QVariant::Double: |