Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/angle/src/libGLESv2/libGLESv2.pro src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
This commit is contained in:
commit
5cfb80a28e
23
mkspecs/common/qcc-base-qnx-aarch64le.conf
Normal file
23
mkspecs/common/qcc-base-qnx-aarch64le.conf
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# qmake configuration for qnx-qcc aarch64le targets
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
|
||||
include(g++-unix.conf)
|
||||
include(unix.conf)
|
||||
|
||||
QMAKE_CC = qcc -Vgcc_ntoaarch64le
|
||||
QMAKE_CXX = qcc -Vgcc_ntoaarch64le
|
||||
QNX_CPUDIR = aarch64le
|
||||
|
||||
include(qcc-base-qnx.conf)
|
||||
|
||||
QMAKE_AR = ntoaarch64-ar cqs
|
||||
QMAKE_OBJCOPY = ntoaarch64-objcopy
|
||||
QMAKE_NM = ntoaarch64-nm -P
|
||||
QMAKE_RANLIB = ntoaarch64-ranlib
|
||||
|
||||
QMAKE_STRIP = ntoaarch64-strip
|
||||
|
||||
load(qt_config)
|
23
mkspecs/common/qcc-base-qnx-x86-64.conf
Normal file
23
mkspecs/common/qcc-base-qnx-x86-64.conf
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# qmake configuration for qnx-qcc x86-64 targets
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
|
||||
include(g++-unix.conf)
|
||||
include(unix.conf)
|
||||
|
||||
QMAKE_CC = qcc -Vgcc_ntox86_64
|
||||
QMAKE_CXX = qcc -Vgcc_ntox86_64
|
||||
QNX_CPUDIR = x86_64
|
||||
|
||||
include(qcc-base-qnx.conf)
|
||||
|
||||
QMAKE_AR = ntox86_64-ar cqs
|
||||
QMAKE_OBJCOPY = ntox86_64-objcopy
|
||||
QMAKE_NM = ntox86_64-nm -P
|
||||
QMAKE_RANLIB = ntox86_64-ranlib
|
||||
|
||||
QMAKE_STRIP = ntox86_64-strip
|
||||
|
||||
load(qt_config)
|
@ -1,6 +1,14 @@
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
SETENV_PFX = "set "
|
||||
SETENV_SFX = "&"
|
||||
} else {
|
||||
SETENV_PFX =
|
||||
SETENV_SFX =
|
||||
}
|
||||
|
||||
QMAKE_MAKE = $$(MAKE)
|
||||
!isEmpty(QMAKE_MAKE) {
|
||||
# We were called recursively. Use the right make, as MAKEFLAGS may be set as well.
|
||||
# We were called recursively. Use the same make.
|
||||
} else:if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) {
|
||||
!equals(QMAKE_HOST.os, Windows): \
|
||||
QMAKE_MAKE = make
|
||||
@ -11,6 +19,8 @@ QMAKE_MAKE = $$(MAKE)
|
||||
} else {
|
||||
error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
|
||||
}
|
||||
# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
|
||||
QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
|
||||
|
||||
# Ensure that a cache is present. If none was found on startup, this will create
|
||||
# one in the build directory of the project which loads this feature.
|
||||
|
@ -27,6 +27,6 @@ DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
|
||||
|
||||
# In static builds of Qt, convenience libraries must be installed,
|
||||
# as in this case they are not linked to the final library/plugin.
|
||||
installed|contains(QT_CONFIG, static): load(qt_installs)
|
||||
installed|if(!not_installed:contains(QT_CONFIG, static)): load(qt_installs)
|
||||
|
||||
TARGET = $$qt5LibraryTarget($$TARGET)
|
||||
|
@ -27,7 +27,12 @@ have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) {
|
||||
CONFIG += any_bundle
|
||||
}
|
||||
|
||||
debug_info_target_dir = $${debug_info_target}.$$debug_info_suffix/Contents/Resources/DWARF
|
||||
debug_info_target_rel = $$section(debug_info_target, /, -1, -1)
|
||||
|
||||
debug_info_target_dir_suffix = .$$debug_info_suffix/Contents/Resources/DWARF
|
||||
|
||||
debug_info_target_dir = $${debug_info_target}$${debug_info_target_dir_suffix}
|
||||
debug_info_target_dir_rel = $${debug_info_target_rel}$${debug_info_target_dir_suffix}
|
||||
!isEmpty(QMAKE_RESOLVED_BUNDLE): \
|
||||
QMAKE_TARGET_DEBUG_INFO = $$debug_info_target_dir/$$TARGET
|
||||
else: \
|
||||
@ -52,8 +57,23 @@ have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) {
|
||||
debug_info_plist.output = $${debug_info_target}.$$debug_info_suffix/Contents/Info.plist
|
||||
QMAKE_SUBSTITUTES += debug_info_plist
|
||||
}
|
||||
|
||||
contains(INSTALLS, target):isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) {
|
||||
!build_pass|release {
|
||||
debug_info_plist_target.CONFIG += no_check_exist
|
||||
debug_info_plist_target.files = $${debug_info_target}.$$debug_info_suffix/Contents/Info.plist
|
||||
debug_info_plist_target.path += $${target.path}/$${debug_info_target_rel}.$$debug_info_suffix/Contents
|
||||
INSTALLS += debug_info_plist_target
|
||||
}
|
||||
|
||||
debug_info_target.CONFIG += no_check_exist
|
||||
debug_info_target.files = $$QMAKE_TARGET_DEBUG_INFO
|
||||
debug_info_target.path += $${target.path}/$${debug_info_target_dir_rel}
|
||||
INSTALLS += debug_info_target
|
||||
}
|
||||
} else {
|
||||
QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.$$debug_info_suffix
|
||||
target.targets += $$QMAKE_TARGET_DEBUG_INFO
|
||||
}
|
||||
|
||||
shell_target = $$shell_quote($$relative_path($$QMAKE_RESOLVED_TARGET, $$OUT_PWD))
|
||||
@ -72,6 +92,5 @@ have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) {
|
||||
}
|
||||
silent:QMAKE_POST_LINK = @echo creating $@.$$debug_info_suffix && $$QMAKE_POST_LINK
|
||||
|
||||
target.targets += $$QMAKE_TARGET_DEBUG_INFO
|
||||
QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = hpux
|
||||
CONFIG += plugin_no_soname
|
||||
|
||||
include(../common/unix.conf)
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = hpux
|
||||
CONFIG += plugin_no_soname
|
||||
|
||||
include(../common/unix.conf)
|
||||
|
||||
|
@ -47,7 +47,6 @@
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = hpux
|
||||
CONFIG += plugin_no_soname
|
||||
|
||||
include(../common/unix.conf)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk
|
||||
CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first sdk
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET =
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += app_bundle incremental global_init_link_order lib_version_first
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/macx.conf)
|
||||
|
17
mkspecs/qnx-aarch64le-qcc/qmake.conf
Normal file
17
mkspecs/qnx-aarch64le-qcc/qmake.conf
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# qmake configuration for qnx aarch64le systems
|
||||
#
|
||||
|
||||
DEFINES += QT_NO_CLIPBOARD _FORTIFY_SOURCE=2
|
||||
|
||||
QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
include(../common/qcc-base-qnx-aarch64le.conf)
|
||||
|
||||
contains(QT_CONFIG, stack-protector-strong) {
|
||||
QMAKE_CFLAGS += -fstack-protector-strong
|
||||
QMAKE_CXXFLAGS += -fstack-protector-strong
|
||||
} else {
|
||||
QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
|
||||
QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all
|
||||
}
|
34
mkspecs/qnx-aarch64le-qcc/qplatformdefs.h
Normal file
34
mkspecs/qnx-aarch64le-qcc/qplatformdefs.h
Normal file
@ -0,0 +1,34 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 QNX Software Systems. All rights reserved.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL21$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see http://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at http://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** As a special exception, The Qt Company gives you certain additional
|
||||
** rights. These rights are described in The Qt Company LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../qnx-armle-v7-qcc/qplatformdefs.h"
|
17
mkspecs/qnx-x86-64-qcc/qmake.conf
Normal file
17
mkspecs/qnx-x86-64-qcc/qmake.conf
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# qmake configuration for qnx x86-64 systems
|
||||
#
|
||||
|
||||
DEFINES += QT_NO_CLIPBOARD
|
||||
|
||||
QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
|
||||
|
||||
include(../common/qcc-base-qnx-x86-64.conf)
|
||||
|
||||
contains(QT_CONFIG, stack-protector-strong) {
|
||||
QMAKE_CFLAGS += -fstack-protector-strong
|
||||
QMAKE_CXXFLAGS += -fstack-protector-strong
|
||||
} else {
|
||||
QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
|
||||
QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all
|
||||
}
|
34
mkspecs/qnx-x86-64-qcc/qplatformdefs.h
Normal file
34
mkspecs/qnx-x86-64-qcc/qplatformdefs.h
Normal file
@ -0,0 +1,34 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 QNX Software Systems. All rights reserved.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake spec of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL21$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see http://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at http://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 or version 3 as published by the Free
|
||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
||||
** following information to ensure the GNU Lesser General Public License
|
||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** As a special exception, The Qt Company gives you certain additional
|
||||
** rights. These rights are described in The Qt Company LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../qnx-x86-qcc/qplatformdefs.h"
|
@ -4,7 +4,6 @@
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = tru64
|
||||
CONFIG += plugin_no_soname
|
||||
|
||||
include(../common/unix.conf)
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
QMAKE_PLATFORM = tru64
|
||||
CONFIG += plugin_no_soname
|
||||
|
||||
include(../common/unix.conf)
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
# static builds should still link ANGLE dynamically when dynamic GL is enabled
|
||||
static:contains(QT_CONFIG, dynamicgl) {
|
||||
CONFIG -= static
|
||||
CONFIG += shared
|
||||
}
|
||||
|
||||
CONFIG += installed
|
||||
include (../config.pri)
|
||||
|
||||
@ -48,10 +54,4 @@ winrt|if(msvc:!win32-msvc2005:!win32-msvc2008:!win32-msvc2010) {
|
||||
}
|
||||
}
|
||||
|
||||
# static builds should still link ANGLE dynamically when dynamic GL is enabled
|
||||
static:contains(QT_CONFIG, dynamicgl) {
|
||||
CONFIG -= static
|
||||
CONFIG += shared
|
||||
}
|
||||
|
||||
static: DEFINES *= LIBGLESV2_EXPORT_H_ ANGLE_EXPORT=
|
||||
|
@ -1,4 +1,5 @@
|
||||
CONFIG += static
|
||||
contains(QT_CONFIG, dynamicgl): CONFIG += not_installed
|
||||
include(../../config.pri)
|
||||
|
||||
INCLUDEPATH = $$ANGLE_DIR/src/compiler/preprocessor
|
||||
|
@ -1,4 +1,5 @@
|
||||
CONFIG += static
|
||||
contains(QT_CONFIG, dynamicgl): CONFIG += not_installed
|
||||
include(../config.pri)
|
||||
|
||||
INCLUDEPATH += \
|
||||
|
@ -1,4 +1,3 @@
|
||||
CONFIG += installed
|
||||
include(../common/common.pri)
|
||||
DEF_FILE_TARGET=$${TARGET}
|
||||
TARGET=$$qtLibraryTarget($${LIBEGL_NAME})
|
||||
|
@ -1,4 +1,4 @@
|
||||
CONFIG += simd installed no_batch
|
||||
CONFIG += simd no_batch
|
||||
include(../common/common.pri)
|
||||
DEF_FILE_TARGET=$${TARGET}
|
||||
TARGET=$$qtLibraryTarget($${LIBGLESV2_NAME})
|
||||
|
@ -27,8 +27,9 @@ ANDROID_PERMISSIONS = \
|
||||
android.permission.WRITE_EXTERNAL_STORAGE
|
||||
|
||||
# QtCore can't be compiled with -Wl,-no-undefined because it uses the "environ"
|
||||
# variable and on FreeBSD, this variable is in the final executable itself
|
||||
freebsd: QMAKE_LFLAGS_NOUNDEF =
|
||||
# variable and on FreeBSD and OpenBSD, this variable is in the final executable itself.
|
||||
# OpenBSD 6.0 will include environ in libc.
|
||||
freebsd|openbsd: QMAKE_LFLAGS_NOUNDEF =
|
||||
|
||||
load(qfeatures)
|
||||
|
||||
|
@ -318,7 +318,7 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib)
|
||||
}
|
||||
|
||||
if (!ret && lib)
|
||||
lib->errorString = QLibrary::tr("Plugin verification data mismatch in '%1'").arg(library);
|
||||
lib->errorString = QLibrary::tr("Failed to extract plugin meta data from '%1'").arg(library);
|
||||
file.close();
|
||||
return ret;
|
||||
}
|
||||
|
@ -4141,8 +4141,6 @@ QDateTime QDateTime::currentDateTimeUtc()
|
||||
|
||||
qint64 QDateTime::currentMSecsSinceEpoch() Q_DECL_NOTHROW
|
||||
{
|
||||
QDate d;
|
||||
QTime t;
|
||||
SYSTEMTIME st;
|
||||
memset(&st, 0, sizeof(SYSTEMTIME));
|
||||
GetSystemTime(&st);
|
||||
|
@ -1294,7 +1294,8 @@ static inline QImage qt_gl_read_framebuffer_rgba8(const QSize &size, bool includ
|
||||
(qstrcmp(renderer, "Mali-T760") == 0
|
||||
&& ::strstr(ver, "3.1") != 0) ||
|
||||
(qstrcmp(renderer, "Mali-T720") == 0
|
||||
&& ::strstr(ver, "3.1") != 0);
|
||||
&& ::strstr(ver, "3.1") != 0) ||
|
||||
qstrcmp(renderer, "PowerVR SGX 554") == 0;
|
||||
|
||||
const bool supports_bgra = has_bgra_ext && !blackListed;
|
||||
|
||||
|
@ -140,7 +140,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
|
||||
if (yend < 0 || yend >= srch)
|
||||
--h;
|
||||
int xend = (basex + ix * (w - 1)) >> 16;
|
||||
if (xend < 0 || xend >= (int)(sbpl/sizeof(quint32)))
|
||||
if (xend < 0 || xend >= (int)(sbpl/sizeof(SRC)))
|
||||
--w;
|
||||
|
||||
while (h--) {
|
||||
|
@ -373,10 +373,10 @@ int q_SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPT
|
||||
int q_SSL_set_ex_data(SSL *ssl, int idx, void *arg);
|
||||
void *q_SSL_get_ex_data(const SSL *ssl, int idx);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_PSK
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
|
||||
typedef unsigned int (*q_psk_client_callback_t)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len);
|
||||
void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback);
|
||||
#endif // OPENSSL_NO_PSK
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
const SSL_METHOD *q_SSLv2_client_method();
|
||||
|
@ -217,8 +217,12 @@ void QIOSContext::swapBuffers(QPlatformSurface *surface)
|
||||
if (surface->surface()->surfaceClass() == QSurface::Offscreen)
|
||||
return; // Nothing to do
|
||||
|
||||
// When using threaded rendering, the render-thread may not have picked up
|
||||
// yet on the fact that a window is no longer exposed, and will try to swap
|
||||
// a non-exposed window. This may in some cases result in crashes, e.g. when
|
||||
// iOS is suspending an application, so we have an extra guard here.
|
||||
if (!static_cast<QIOSWindow *>(surface)->isExposed()) {
|
||||
qCWarning(lcQpaGLContext, "Detected swapBuffers on a non-exposed window, skipping flush");
|
||||
qCDebug(lcQpaGLContext, "Detected swapBuffers on a non-exposed window, skipping flush");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -223,26 +223,7 @@ void QIOSWindow::applyGeometry(const QRect &rect)
|
||||
|
||||
bool QIOSWindow::isExposed() const
|
||||
{
|
||||
// Note: At startup of an iOS app it will enter UIApplicationStateInactive
|
||||
// while showing the launch screen, and once the application returns from
|
||||
// applicationDidFinishLaunching it will hide the launch screen and enter
|
||||
// UIApplicationStateActive. Technically, a window is not exposed until
|
||||
// it's actually visible on screen, and Apple also documents that "Apps
|
||||
// that use OpenGL ES for drawing must not use didFinishLaunching to
|
||||
// prepare their drawing environment. Instead, defer any OpenGL ES
|
||||
// drawing calls to applicationDidBecomeActive". Unfortunately, if we
|
||||
// wait until the applicationState reaches ApplicationActive to signal
|
||||
// that the window is exposed, we get a lag between hiding the launch
|
||||
// screen and blitting the first pixels of the application, as Qt
|
||||
// spends some time drawing those pixels in response to the expose.
|
||||
// In practice there doesn't seem to be any issues starting GL setup
|
||||
// and drawing from within applicationDidFinishLaunching, and this is
|
||||
// also the recommended approach for other 3rd party GL toolkits on iOS,
|
||||
// so we 'cheat', and report that a window is exposed even if the app
|
||||
// is in UIApplicationStateInactive, so that the startup transition
|
||||
// between the launch screen and the application content is smooth.
|
||||
|
||||
return qApp->applicationState() > Qt::ApplicationHidden
|
||||
return qApp->applicationState() >= Qt::ApplicationActive
|
||||
&& window()->isVisible() && !window()->geometry().isEmpty();
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,9 @@
|
||||
#include "qwidget_p.h"
|
||||
#include "qwindow.h"
|
||||
|
||||
#include <private/qhighdpiscaling_p.h>
|
||||
#include <qpa/qplatformscreen.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QDesktopScreenWidget::QDesktopScreenWidget(QScreen *screen, const QRect &geometry)
|
||||
@ -245,18 +248,18 @@ int QDesktopWidget::screenNumber(const QWidget *w) const
|
||||
if (screens.isEmpty()) // This should never happen
|
||||
return primaryScreen();
|
||||
|
||||
const QWindow *winHandle = w->windowHandle();
|
||||
if (!winHandle) {
|
||||
if (const QWidget *nativeParent = w->nativeParentWidget())
|
||||
winHandle = nativeParent->windowHandle();
|
||||
}
|
||||
|
||||
// If there is more than one virtual desktop
|
||||
if (screens.count() != screens.constFirst()->virtualSiblings().count()) {
|
||||
// Find the root widget, get a QScreen from it and use the
|
||||
// virtual siblings for checking the window position.
|
||||
const QWidget *root = w;
|
||||
const QWidget *tmp = w;
|
||||
while ((tmp = tmp->parentWidget()))
|
||||
root = tmp;
|
||||
const QWindow *winHandle = root->windowHandle();
|
||||
if (winHandle) {
|
||||
const QScreen *winScreen = winHandle->screen();
|
||||
if (winScreen)
|
||||
if (const QScreen *winScreen = winHandle->screen())
|
||||
screens = winScreen->virtualSiblings();
|
||||
}
|
||||
}
|
||||
@ -266,11 +269,12 @@ int QDesktopWidget::screenNumber(const QWidget *w) const
|
||||
QRect frame = w->frameGeometry();
|
||||
if (!w->isWindow())
|
||||
frame.moveTopLeft(w->mapToGlobal(QPoint(0, 0)));
|
||||
const QRect nativeFrame = QHighDpi::toNativePixels(frame, winHandle);
|
||||
|
||||
QScreen *widgetScreen = Q_NULLPTR;
|
||||
int largestArea = 0;
|
||||
foreach (QScreen *screen, screens) {
|
||||
QRect intersected = screen->geometry().intersected(frame);
|
||||
const QRect intersected = screen->handle()->geometry().intersected(nativeFrame);
|
||||
int area = intersected.width() * intersected.height();
|
||||
if (largestArea < area) {
|
||||
widgetScreen = screen;
|
||||
|
@ -1451,8 +1451,6 @@ bool QDockWidget::event(QEvent *event)
|
||||
switch (event->type()) {
|
||||
#ifndef QT_NO_ACTION
|
||||
case QEvent::Hide:
|
||||
if (d->state && d->state->dragging)
|
||||
d->endDrag(true);
|
||||
if (layout != 0)
|
||||
layout->keepSize(this);
|
||||
d->toggleViewAction->setChecked(false);
|
||||
|
Loading…
Reference in New Issue
Block a user