diff --git a/dist/changes-5.6.2 b/dist/changes-5.6.2 new file mode 100644 index 0000000000..7b62a018f3 --- /dev/null +++ b/dist/changes-5.6.2 @@ -0,0 +1,339 @@ +Qt 5.6.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.6.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.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +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. + +****************************************************************************** +* 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. + + - 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. + + - [QTBUG-47815] QDateTime now uses QLocale to get the "AM" and "PM" strings + when parsing times, instead of strings obtained from the loaded + translations. + +****************************************************************************** +* Library * +****************************************************************************** + +QtCore +------ + + - Optimized toLatin1()/toUtf8() called on a QStringBuilder expression. + - [QTBUG-18729][QTBUG-32457] Fixed a bug that caused Windows to show + dialogs prompting the user to insert media when certain operations were + made with Qt I/O classes, particularly QStorageInfo::mountedVolumes(). + + - QCommandLineParser: + * The methods that exit() the application will now call cleanup routines + registered with qAddPostRoutine. + + - QDataStream: + * Fixed compatibility of QTime serialization with Qt 3. + + - QDebug: + * Fixed streaming of QChars. + + - QJsonObject: + * Optimized equality operator. + + - QJsonValue: + * Fixed use-after-free in assignment operator. + + - QLockFile: + * Fixed permissions on lock files on Unix to allow for adjustments via + umask. + * [QTBUG-53392] Improved the robustness of detecting stale lock files on + Windows. + + - QMutex: + * [QTBUG-54831] Fixed a bug that caused some applications to crash on + exit, depending on the order of creation of certain statics inside Qt. + + - QObject: + * Fixed a crash when connecting a signal to a lambda or functor while + using Qt::UniqueConnection (note: the connection is still not unique). + + - QStringListModel: + * Fixed dataChanged()'s 'roles' parameter to always contain both + Qt::EditRole and Qt::DisplayRole. + + - QTemporaryFile: + * [QTBUG-54810] Fixed a bug that caused QTemporaryFile to fail when the + file name contained non-ASCII characters, on Windows. + + - QTimeZone: + * [QTBUG-53071] Fixed a bug that caused QTimeZone to mis-parse time zones + whose names were not simple letter and digit combinations. + + - QUrl: + * Made QUrl stricter in what it accepts for schemes, to comply with the + relevant standards. QUrl will no longer accept schemes starting with a + plus (+), a dash (-) or a dot (.). + + - QVariant: + * [QTBUG-53384] Fixed QVariant::canConvert and conversion from integer + types to enumeration types. + * [QTBUG-54893] Fixed a bug that caused QVariants not to compare properly + if they contained QStringLists. + + - QVector: + * [QTBUG-51758] Fixed a bug that would cause QVector to crash if one + called reserve(0). + + - 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 +----- + + - Fixed UBSan errors in + * QColor + * QGrayRaster + * QRasterizer + + - Removed a total of 1610 relocations from the library. + + - 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. + + - Text: + * [QTBUG-42033] Fixed bug where a QTextLayout with + ShowLineAndParagraphSeparators would modify the layout's input string. + * [QTBUG-49452] Fixed a performance regression in Freetype engine that + was introduced in Qt 5.5. + * [QTBUG-54180] Fixed performance regression when rapidly switching + between a large set of fonts. + + - Windows: + * [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. + +QtNetwork +--------- + + - QAuthenticator: + * [QTBUG-53338] Fixed crash when comparing an initialized QAuthenticator + with an uninitialized QAuthenticator. + +QtSql +----- + + - [QTBUG-53969][QTBUG-53237] Fixed QSqlQuery::prepare value truncation + error when using UNSIGNED values in a MySQL database. + +QtWidgets +--------- + + - Fixed UBSan/Coverity errors in: + * QAbstractItemView + * QDataWidgetMapper + * QTreeWidget + * QWidgetLineControl + + - Removed a total of 167 relocations from the library. + + - QAbstractItemDelegate: + * [QTBUG-16469] Show localized detailed tooltips and "What's this?" + texts. + +- QAbstractItemView: + * [QTBUG-53541] Fixed a bug involving drawing the drop indicator + where it shouldn't be drawn. + * Fixed a bug in setSelectionModel() which could lead to model indexes + from a different model be reused on a new model. + + - QAbstractSpinBox: + * [QTBUG-55249] Fixed a bug related to first key press. + + - QColorDialog: + * Fixed ignored alpha channel in getRgb(). + + - QComboBox: + * [QTBUG-54191] Fixed a crash on setEditable(false) called from + editTextChanged(). + + - QCompleter: + * [QTBUG-54642] Fixed wrong completion role after a QFileSystemModel + has been used. + + - QDesktopWidget: + * [QTBUG-52101] Fixed tracking of QScreens. + * [QTBUG-52606] Fixed a bug related to DPI-scaling in screenNumber(). + + - QDialog: + * [QTBUG-52735] Fixed a bug involving moves between screens with + different DPI-scaling factors. + + - QDockWidget: + * [QTBUG-52107][QTBUG-53754] Fixed bugs related to floating group tab + window title. + * [QTBUG-52108] A QDockWidgetGroupWindow can now be dragged into one of + its QDockWidgets. + * [QTBUG-53808] Fixed a bug that caused an undocked dock widget to lose + its decoration. + * [QTBUG-54185] Unbroke drag-and-drop. + + - QGraphicsProxyWidget: + * [QTBUG-55112] Fixed a bug that caused the widget to receive events + during construction. + + - QLineEdit: + * [QTBUG-49374] Fixed icons being too small on a High DPI screen + without scaling. + * [QTBUG-52796] Fixed QKeySequence::MoveToStartOfLine shortcut + being ignored. + * [QTBUG-54425] Fixed missing clear button on macOS. + + - QMainWindow: + * [QTBUG-50491] Fixed a bug related to restoring dock widgets with + GroupedDragging. + * [QTBUG-52108] Fixed a bug related to context menus in the presence of + floating tabs. + + - QMenu: + * [QTBUG-53054] Submenus can now be opened on left mouse button + press, too. + + - QMenuBar: + * [QTBUG-53205] Fixed bugs (incl. crashes) involving reparented + menu bars. + + - QOpenGLWidget: + * [QTBUG-50818][QTBUG-51815][QTBUG-54241][QTBUG-52419] Fixed several + repainting bugs and other drawing artifacts. + + - QSideBar: + * Fixed a nullptr dereference on platforms that do not support + QFileSystemWatcher. + + - QSystemTrayIcon: + * [QTBUG-53591] Use large icon for balloon message on Windows systems. + + - QTabBar: + * Fixed a performance problem involving font metrics. + + - QTreeView: + * [QTBUG-52793] Fixed a key navigation bug when the columns were + reordered. + +- QTreeWidget: + * [QTBUG-50207] Now handles device pixel ratio in animations correctly. + +- QWidget: + * [QTBUG-39887] Restored documented behavior for the + WA_X11NetWmWindowType* attributes. + * [QTBUG-41135][QTBUG-50030][QTBUG-50136][QTBUG-52507] Fixed + mapTo/FromGlobal() in case of widget hierarchies embedded into + QGraphicsView with transformations. + * [QTBUG-45484] Fixed setWindowRole(). + * [QTBUG-50796] Reduced paint-events when resizing native widgets. + * [QTBUG-52123] Fixed a bug by which opaque texture-based widgets + were not always shown. + * [QTBUG-53515] Added a workaround for render-to-texture widgets in + fullscreen windows. + * [QTBUG-54734] Worked around an issue with translucent GL windows + on Windows. + * [QTBUG-54906] Fixed a bug relaed to fullscreen handling on Windows. + + - Styles: + * Fixed several cases of QStyleOptions being created with null + version. + * [QTBUG-51266] Fixed painting of small progress bars on Vista+. + * [QTBUG-54630] Fixed a crash in QMacStyle::styleHint(). + * [QTBUG-49374] The Windows style now takes the monitor's differing + logical DPI into account when calculating native metrics. + +****************************************************************************** +* Platform-specific Changes * +****************************************************************************** + +Android +------- + + - [QTBUG-50724] Added support for clang compiler. + - [QTBUG-53511] Fixed CJK font resolution on Android 7. + +BSDs +---- + + - 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. + - Fixed a number of compilation issues on FreeBSD, NetBSD and OpenBSD. Qt + should now build out-of-the-box (no patches needed) on those systems. + +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. + - Fixed the value of the 'defined' field in ATSPI GetAttributeValue + results. + +macOS +----- + + - [QTBUG-48953] Pasting text from Qt applications to Apple Mail now works. + - [QTBUG-48953] “text/vcard” is now required as the mime type when + placing vCards on the clipboard. + - OS X => macOS rename in Q_OS_ macros/docs, qmake scopes, + file selectors, etc. + - Add new QSysInfo values and MAC_OS_X / __MAC_ / __IPHONE_ values for + macOS 10.12 and iOS 9.1 through 10.0. + - Update prettyProductName with new macOS "Sierra" codename. + +Windows +------- + + - Fixed a new[]/delete mismatch in Windows tablet support. + +**************************************************************************** +* Tools * +**************************************************************************** + +moc +--- + - [QTBUG-53441] Fixed crash on file ending with a backslash followed by + carriage return diff --git a/examples/widgets/dialogs/findfiles/window.cpp b/examples/widgets/dialogs/findfiles/window.cpp index ce53dd8c83..1c59054524 100644 --- a/examples/widgets/dialogs/findfiles/window.cpp +++ b/examples/widgets/dialogs/findfiles/window.cpp @@ -294,15 +294,19 @@ void Window::contextMenu(const QPoint &pos) if (!item) return; QMenu menu; +#ifndef QT_NO_CLIPBOARD QAction *copyAction = menu.addAction("Copy Name"); +#endif QAction *openAction = menu.addAction("Open"); QAction *action = menu.exec(filesTable->mapToGlobal(pos)); if (!action) return; const QString fileName = fileNameOfItem(item); - if (action == copyAction) - QGuiApplication::clipboard()->setText(QDir::toNativeSeparators(fileName)); - else if (action == openAction) + if (action == openAction) openFile(fileName); +#ifndef QT_NO_CLIPBOARD + else if (action == copyAction) + QGuiApplication::clipboard()->setText(QDir::toNativeSeparators(fileName)); +#endif } //! [16] diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 75abc4378f..5e37cd65d8 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -1405,6 +1406,28 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString configName = (as_release ? "Release" : "Debug"); QMap settings; + if (!project->isActiveConfig("no_xcode_development_team")) { + const QSettings xcodeSettings( + QDir::homePath() + QLatin1String("/Library/Preferences/com.apple.dt.Xcode.plist"), + QSettings::NativeFormat); + const QVariantMap teams = xcodeSettings.value(QLatin1String("IDEProvisioningTeams")).toMap(); + if (!teams.isEmpty()) { + for (QVariantMap::const_iterator it = teams.begin(), end = teams.end(); it != end; ++it) { + const QVariantMap team = it.value().toMap(); + const QString teamType = team.value(QLatin1String("teamType")).toString(); + + // Skip Company teams because signing permissions may not be available under all + // circumstances for users who are not the Team Agent + if (teamType != QLatin1String("Company")) { + const QString teamId = team.value(QLatin1String("teamID")).toString(); + settings.insert("DEVELOPMENT_TEAM", teamId); + + // first suitable team we found is the one we'll use by default + break; + } + } + } + } settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO")); // Bitcode is only supported with a deployment target >= iOS 6.0. // Disable it for now, and consider switching it on when later diff --git a/src/plugins/platforms/android/qandroidplatformwindow.cpp b/src/plugins/platforms/android/qandroidplatformwindow.cpp index b39695b0ef..7e46e5f09e 100644 --- a/src/plugins/platforms/android/qandroidplatformwindow.cpp +++ b/src/plugins/platforms/android/qandroidplatformwindow.cpp @@ -149,7 +149,7 @@ void QAndroidPlatformWindow::updateStatusBarVisibility() if (!isNonRegularWindow) { if (m_windowState & Qt::WindowFullScreen) QtAndroid::hideStatusBar(); - else if (m_windowState & Qt::WindowMaximized) + else QtAndroid::showStatusBar(); } } diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index dd2ebee3d5..3be17b0180 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -767,7 +767,7 @@ void QWinRTScreen::addWindow(QWindow *window) updateWindowTitle(window->title()); QWindowSystemInterface::handleWindowActivated(window, Qt::OtherFocusReason); handleExpose(); - QWindowSystemInterface::flushWindowSystemEvents(); + QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); #if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP) QWinRTDrag::instance()->setDropTarget(window); @@ -785,7 +785,7 @@ void QWinRTScreen::removeWindow(QWindow *window) if (wasTopWindow) QWindowSystemInterface::handleWindowActivated(Q_NULLPTR, Qt::OtherFocusReason); handleExpose(); - QWindowSystemInterface::flushWindowSystemEvents(); + QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); #if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP) if (wasTopWindow) QWinRTDrag::instance()->setDropTarget(topWindow()); diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index f2b54f57f2..88dcd8170b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -314,6 +314,12 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary["QT_GCC_MAJOR_VERSION"] = parts.value(0, zero); dictionary["QT_GCC_MINOR_VERSION"] = parts.value(1, zero); dictionary["QT_GCC_PATCH_VERSION"] = parts.value(2, zero); + } else if (dictionary["QMAKESPEC"].contains(QString("msvc"))) { + const QString zero = QStringLiteral("0"); + const QStringList parts = Environment::msvcVersion().split(QLatin1Char('.')); + dictionary["QT_CL_MAJOR_VERSION"] = parts.value(0, zero); + dictionary["QT_CL_MINOR_VERSION"] = parts.value(1, zero); + dictionary["QT_CL_PATCH_VERSION"] = parts.value(2, zero); } } @@ -3629,6 +3635,10 @@ void Configure::generateQConfigPri() configStream << "QT_GCC_MAJOR_VERSION = " << dictionary["QT_GCC_MAJOR_VERSION"] << endl << "QT_GCC_MINOR_VERSION = " << dictionary["QT_GCC_MINOR_VERSION"] << endl << "QT_GCC_PATCH_VERSION = " << dictionary["QT_GCC_PATCH_VERSION"] << endl; + } else if (!dictionary["QT_CL_MAJOR_VERSION"].isEmpty()) { + configStream << "QT_CL_MAJOR_VERSION = " << dictionary["QT_CL_MAJOR_VERSION"] << endl + << "QT_CL_MINOR_VERSION = " << dictionary["QT_CL_MINOR_VERSION"] << endl + << "QT_CL_PATCH_VERSION = " << dictionary["QT_CL_PATCH_VERSION"] << endl; } if (dictionary.value("XQMAKESPEC").startsWith("wince")) { diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 5e28fda11d..10cf5ace2a 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -169,6 +169,30 @@ QString Environment::gccVersion() return version; } +QString Environment::msvcVersion() +{ + int returnValue = 0; + // Extract version from standard error output of "cl /?" + const QString command = QFile::decodeName(qgetenv("ComSpec")) + + QLatin1String(" /c ") + QLatin1String(compilerInfo(CC_MSVC2015)->executable) + + QLatin1String(" /? 2>&1"); + QString version = execute(command, &returnValue); + if (returnValue != 0) { + cout << "Could not get cl version" << returnValue << qPrintable(version) << '\n';; + version.clear(); + } else { + QRegExp versionRegexp(QStringLiteral("^.*Compiler Version ([0-9.]+) for.*$")); + Q_ASSERT(versionRegexp.isValid()); + if (versionRegexp.exactMatch(version)) { + version = versionRegexp.cap(1); + } else { + cout << "Unable to determine cl version from the output of \"" + << qPrintable(command) << "\"\n"; + } + } + return version; +} + /*! Returns the enum of the compiler which was detected on the system. The compilers are detected in the order as entered into the diff --git a/tools/configure/environment.h b/tools/configure/environment.h index 927c3e294f..d096782e70 100644 --- a/tools/configure/environment.h +++ b/tools/configure/environment.h @@ -57,6 +57,7 @@ public: static QString detectQMakeSpec(); static Compiler compilerFromQMakeSpec(const QString &qmakeSpec); static QString gccVersion(); + static QString msvcVersion(); static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv); static QString execute(const QString &command, int *returnCode = 0);