Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.11.1' into 5.11
Browse files Browse the repository at this point in the history
Change-Id: I9a4571ccf826a86e055dfbba23b5e5cbd8ea55e8
  • Loading branch information
Qt Forward Merge Bot committed Jun 19, 2018
2 parents d0acd26 + 74305ba commit 8eabb44
Show file tree
Hide file tree
Showing 35 changed files with 660 additions and 206 deletions.
144 changes: 144 additions & 0 deletions dist/changes-5.11.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
Qt 5.11.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.11.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.11 series is binary compatible with the 5.10.x series.
Applications compiled for 5.10 will continue to run with 5.11.

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-68619] In Qt 5.11.0, support for selecting a platform plugin
based on the XDG_SESSION_TYPE environment variable was added. On
gnome-shell, however, bugs—in both Qt and gnome-shell—made many
widget applications almost unusable. So until those bugs are fixed
XDG_SESSION_TYPE=wayland is now ignored on gnome-shell.

****************************************************************************
* Library *
****************************************************************************

QtCore
------

- Item Models:
* [QTBUG-18001] Fixed a bug that made selecting or deselecting a column if
some flags are applied to certain items.
* [QTBUG-44962][QTBUG-67948][QTBUG-68427] Fixed issues with the replacing
of the source model in QSortFilterProxyModel that could lead to empty
views or failed assertions.

- QJsonDocument
* [QTBUG-61969] Fixed a number of bugs in the parsing of binary data
(QJson::fromRawData) that could lead to crashes or out-of-bounds access.

- QLocale:
* On Unix, when using LANGUAGE would lose information about script or
country, without changing language, use the locale implied by LC_ALL,
LC_MESSAGES or LANG.

- QPointF/QRectF:
* [QTBUG-60359][QTBUG-62161] Fixed an issue that led to inconsistent
comparison results for the different edges of a rectangle.

- QProcess:
* [QTBUG-68472] On Unix, the QProcess SIGCHLD handler now restores errno
on exit.
* [QTBUG-67744] QProcess now properly reports an error state if it failed
to create the communication pipes.

- QSharedPointer:
* [QTBUG-68300] Fixed a problem that made create() on a type with const
qualification fail to compile.

QtNetwork
---------

- QNetworkCookieJar:
* [QTBUG-52040] Cookies will no longer be rejected when the domain
matches a TLD. However (to avoid problems with TLDs), such cookies are
only accepted, or sent, when the host name matches exactly.

QtWidgets
---------

- [QTBUG-48325] Sending a key press event with sendEvent() now sends a
ShortCutOverride event first to the widget to trigger any shortcuts set
first.
- [QTBUG-67533] QOpenGLWidget/QQuickWidget is now respecting AlwaysStackOnTop.
- [QTBUG-60404] Fixed crash in QMacPanGestureRecognizer.
- [QTBUG-67836] Fixed input method commits that end with newline.
- [QTBUG-33855] Fixed issue with fonts in QHeaderViews
- [QTBUG-56457] Fixed margin issue related to sections in QHeaderView.

****************************************************************************
* Platform-specific Changes *
****************************************************************************

Android
-------

- [QTBUG-68344] QTemporaryFile does not try to use O_TMPFILE any more,
to work around outdated sandbox restrictions of linkat(). This also fixes
use of QSettings and QFile::copy().

Linux
-----

- [QTBUG-68586] Fixed a bug that caused QFileSystemWatcher to print a warning
if the file being watched did not exist. The class is documented to return
the list of files that it could not watch.

macOS
-----

- [QTBUG-60676] Fixed a bug in using QFileSystemWatcher to watch different
file paths that shared a common prefix.

Windows
-------

- [QTBUG-68514] Reverted a change that caused static binaries compiled
with Visual Studio 2015 to crash on start-up. Note that this does not
apply to Visual Studio 2017 static binaries, even though the crash stack
traces are very similar: with 2017, the problem is compiler regression
and requires updating to version 15.8 for the fix.

****************************************************************************
* Tools *
****************************************************************************

configure & build system
------------------------

- [QTBUG-68478] Fixed parallel build of examples in some modules.

qmake
-----

- [QTBUG-37417][CMake] Fixed missing include paths in private modules.
- [QTBUG-47325] Fixed crash when $QMAKEFEATURES contains empty paths
(e.g., due to a trailing colon).
- [QTBUG-52474][Xcode] Fixed sources being excluded from Time Machine
backups.
- [QTBUG-66462][Darwin] Fixed overriding QMAKE_TARGET_BUNDLE_PREFIX in
project files.
- [QTBUG-68705][Xcode] Fixed build directory location of app bundles.
- [Xcode] Fixed compatibility with Xcode 10 by opting out from the new
build system.
- [Darwin] Fixed .prl file lookup for suffixed frameworks.
- Fixed look-up of relative files from extra compilers' .depend_command
in shadow builds.
2 changes: 2 additions & 0 deletions mkspecs/macx-xcode/WorkspaceSettings.xcsettings
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
<false/>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion qmake/generators/mac/pbuilder_pbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
// The configuration build dir however is not treated as excluded,
// so we can safely point it to the root output dir.
t << "\t\t\t\t" << writeSettings("CONFIGURATION_BUILD_DIR",
Option::output_dir + Option::dir_sep + "$(CONFIGURATION)") << ";\n";
Option::output_dir + Option::dir_sep + "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)") << ";\n";

if (!project->isEmpty("DESTDIR")) {
ProString dir = project->first("DESTDIR");
Expand Down
51 changes: 51 additions & 0 deletions src/corelib/Qt5CoreMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,54 @@ function(QT5_ADD_RESOURCES outfiles )
endfunction()

set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")

if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
macro(qt5_use_modules _target _link_type)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
if(CMAKE_WARN_DEPRECATED)
set(messageType WARNING)
endif()
if(CMAKE_ERROR_DEPRECATED)
set(messageType FATAL_ERROR)
endif()
if(messageType)
message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.")
endif()
endif()

if (NOT TARGET ${_target})
message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
endif()
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
set(_qt5_modules ${ARGN})
set(_qt5_link_type ${_link_type})
else()
set(_qt5_modules ${_link_type} ${ARGN})
endif()

if ("${_qt5_modules}" STREQUAL "")
message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
endif()

foreach(_module ${_qt5_modules})
if (NOT Qt5${_module}_FOUND)
find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
if (NOT Qt5${_module}_FOUND)
message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
endif()
endif()
target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
if (Qt5_POSITION_INDEPENDENT_CODE
AND (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
endif()
endforeach()
endmacro()
endif()
79 changes: 8 additions & 71 deletions src/corelib/global/qsystemdetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,6 @@
# // Numerical checks are preferred to named checks, but to be safe
# // we define the missing version names in case Qt uses them.
#
# if !defined(__MAC_10_7)
# define __MAC_10_7 1070
# endif
# if !defined(__MAC_10_8)
# define __MAC_10_8 1080
# endif
# if !defined(__MAC_10_9)
# define __MAC_10_9 1090
# endif
# if !defined(__MAC_10_10)
# define __MAC_10_10 101000
# endif
# if !defined(__MAC_10_11)
# define __MAC_10_11 101100
# endif
Expand All @@ -237,17 +225,8 @@
# if !defined(__MAC_10_13)
# define __MAC_10_13 101300
# endif
# if !defined(MAC_OS_X_VERSION_10_7)
# define MAC_OS_X_VERSION_10_7 1070
# endif
# if !defined(MAC_OS_X_VERSION_10_8)
# define MAC_OS_X_VERSION_10_8 1080
# endif
# if !defined(MAC_OS_X_VERSION_10_9)
# define MAC_OS_X_VERSION_10_9 1090
# endif
# if !defined(MAC_OS_X_VERSION_10_10)
# define MAC_OS_X_VERSION_10_10 101000
# if !defined(__MAC_10_14)
# define __MAC_10_14 101400
# endif
# if !defined(MAC_OS_X_VERSION_10_11)
# define MAC_OS_X_VERSION_10_11 101100
Expand All @@ -258,55 +237,10 @@
# if !defined(MAC_OS_X_VERSION_10_13)
# define MAC_OS_X_VERSION_10_13 101300
# endif
#
# if !defined(__IPHONE_4_3)
# define __IPHONE_4_3 40300
# endif
# if !defined(__IPHONE_5_0)
# define __IPHONE_5_0 50000
# endif
# if !defined(__IPHONE_5_1)
# define __IPHONE_5_1 50100
# endif
# if !defined(__IPHONE_6_0)
# define __IPHONE_6_0 60000
# endif
# if !defined(__IPHONE_6_1)
# define __IPHONE_6_1 60100
# endif
# if !defined(__IPHONE_7_0)
# define __IPHONE_7_0 70000
# endif
# if !defined(__IPHONE_7_1)
# define __IPHONE_7_1 70100
# endif
# if !defined(__IPHONE_8_0)
# define __IPHONE_8_0 80000
# endif
# if !defined(__IPHONE_8_1)
# define __IPHONE_8_1 80100
# endif
# if !defined(__IPHONE_8_2)
# define __IPHONE_8_2 80200
# endif
# if !defined(__IPHONE_8_3)
# define __IPHONE_8_3 80300
# endif
# if !defined(__IPHONE_8_4)
# define __IPHONE_8_4 80400
# endif
# if !defined(__IPHONE_9_0)
# define __IPHONE_9_0 90000
# endif
# if !defined(__IPHONE_9_1)
# define __IPHONE_9_1 90100
# endif
# if !defined(__IPHONE_9_2)
# define __IPHONE_9_2 90200
# endif
# if !defined(__IPHONE_9_3)
# define __IPHONE_9_3 90300
# if !defined(MAC_OS_X_VERSION_10_14)
# define MAC_OS_X_VERSION_10_14 101400
# endif
#
# if !defined(__IPHONE_10_0)
# define __IPHONE_10_0 100000
# endif
Expand All @@ -322,6 +256,9 @@
# if !defined(__IPHONE_11_0)
# define __IPHONE_11_0 110000
# endif
# if !defined(__IPHONE_12_0)
# define __IPHONE_12_0 120000
# endif
#endif

#ifdef __LSB_VERSION__
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/kernel/kernel.pri
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ mac {

LIBS_PRIVATE += -framework Foundation

osx: LIBS_PRIVATE += -framework CoreServices -framework AppKit
osx: LIBS_PRIVATE += -framework CoreServices -framework AppKit -framework Security

ios|tvos {
# We need UIKit for UIApplication in qeventdispatcher_cf.mm
Expand Down
41 changes: 41 additions & 0 deletions src/corelib/kernel/qcore_mac_objc.mm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
#include <AppKit/NSText.h>
#endif

#if defined(QT_PLATFORM_UIKIT)
#include <UIKit/UIKit.h>
#endif

#include <qdebug.h>

QT_BEGIN_NAMESPACE
Expand Down Expand Up @@ -189,6 +193,43 @@ bool qt_apple_isApplicationExtension()
}
#endif

#if defined(Q_OS_MACOS) && !defined(QT_BOOTSTRAPPED)
bool qt_apple_isSandboxed()
{
static bool isSandboxed = []() {
QCFType<SecStaticCodeRef> staticCode = nullptr;
NSURL *bundleUrl = [[NSBundle mainBundle] bundleURL];
if (SecStaticCodeCreateWithPath((__bridge CFURLRef)bundleUrl,
kSecCSDefaultFlags, &staticCode) != errSecSuccess)
return false;

QCFType<SecRequirementRef> sandboxRequirement;
if (SecRequirementCreateWithString(CFSTR("entitlement[\"com.apple.security.app-sandbox\"] exists"),
kSecCSDefaultFlags, &sandboxRequirement) != errSecSuccess)
return false;

if (SecStaticCodeCheckValidityWithErrors(staticCode,
kSecCSBasicValidateOnly, sandboxRequirement, nullptr) != errSecSuccess)
return false;

return true;
}();
return isSandboxed;
}

QT_END_NAMESPACE
@implementation NSObject (QtSandboxHelpers)
- (id)qt_valueForPrivateKey:(NSString *)key
{
if (qt_apple_isSandboxed())
return nil;

return [self valueForKey:key];
}
@end
QT_BEGIN_NAMESPACE
#endif

#ifdef Q_OS_MACOS
/*
Ensure that Objective-C objects auto-released in main(), directly or indirectly,
Expand Down
Loading

0 comments on commit 8eabb44

Please sign in to comment.