Merge remote-tracking branch 'origin/5.14' into 5.15

Change-Id: I98b1a5a11ece3957a1115c1d9be8841759206ffe
This commit is contained in:
Qt Forward Merge Bot 2020-01-29 01:00:55 +01:00
commit a3fc03c130
20 changed files with 275 additions and 49 deletions

74
dist/changes-5.14.1 vendored Normal file
View File

@ -0,0 +1,74 @@
Qt 5.14.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.14.0.
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.14 series is binary compatible with the 5.13.x series.
Applications compiled for 5.13 will continue to run with 5.14.
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.
****************************************************************************
* MinGW *
****************************************************************************
- Qt will by default be built in release mode. Use -debug-or-release to
force the pre 5.14.0 default.
****************************************************************************
* QtCore *
****************************************************************************
- QCborValue:
* The constructor taking a CBOR tag and a value to be tagged now
attempts to convert to a QCborValue extended type. For example, if the
tag is 0 (UnixTime_t) and the payload is a number, the resulting
object will become tag 1 (DateTime) and the payload will be the the
ISO-8601 date/time string.
- QDateTime:
* ISO 8601: parsing of dates now requires a punctuator as separator (it
previously allowed any non-digit; officially only a dash should be
allowed) and parsing of date-times no longer tolerates spaces in the
numeric fields: an internal space is only allowed in an ISO 8601
date-time as replacement for the T between date and time.
****************************************************************************
* QtGui *
****************************************************************************
- QGuiApplication:
* [QTBUG-80934] Fixed High DPI scaling factors to be equal to pre 5.14.
****************************************************************************
* QtWidgets *
****************************************************************************
- QApplication:
* [QTBUG-81107] Fixed an exit hang related to QGraphicsProxyWidget.
- QToolTip:
* Make sure that the tooltip is not obscured by very large mouse
pointers on Windows and macOS.
****************************************************************************
* Tools *
****************************************************************************
- rcc:
* rcc now generates correct code when using the --namespace option.
****************************************************************************
* macOS/iOS *
****************************************************************************
- Fixed a bug where QFontDatabase::systemFont() would return the wrong
fonts on macOS 10.15 and iOS 13.

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@ -482,6 +482,11 @@
\title Khronos OpenGL ES API Registry
*/
/*!
\externalpage https://www.khronos.org/opengl/wiki/Array_Texture
\title Array Texture
*/
/*!
\externalpage https://github.com/iksaif/qsslkey-p11
\title qsslkey example

View File

@ -36,7 +36,7 @@ build_pass {
}
}
} else: contains(TEMPLATE, "lib"):!static:!QTDIR_build:android_install {
tmpvar = $$str_member(TARGET, -$$str_size(QT_ARCH), -1)
tmpvar = $$str_member($$TARGET, -$$str_size($${QT_ARCH}), -1)
!equals(tmpvar, $${QT_ARCH}): TARGET = $${TARGET}_$${QT_ARCH}
target.path = /libs/$$ANDROID_TARGET_ARCH/
INSTALLS *= target

View File

@ -212,17 +212,20 @@ contains(CONFIG, plugin) {
CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _)
win32 {
!mingw|qtConfig(debug_and_release): debug_suffix="d"
CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl
isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.dll
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.dll
} else:mingw {
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.a
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}$${debug_suffix}.a
} else { # MSVC static
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.lib
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.lib
}
} else {
mac {
@ -313,27 +316,29 @@ mac {
CMAKE_WINDOWS_BUILD = "true"
CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll
!mingw|qtConfig(debug_and_release): debug_suffix="d"
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_STATIC_WINDOWS_BUILD = "true"
CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.prl
CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
}
mingw {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}$${debug_suffix}.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}$${debug_suffix}.a
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
} else {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}$${debug_suffix}.lib
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.lib
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
}
} else {

View File

@ -72,6 +72,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends \"${_prl_strings}\")
string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries \"${CMAKE_CXX_STANDARD_LIBRARIES}\")
set(_search_paths)
set(_fw_search_paths)
set(_framework_flag)
string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
foreach(_flag ${_static_depends})
@ -79,10 +80,13 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
if(_flag MATCHES \"^-framework$\")
# Handle the next flag as framework name
set(_framework_flag 1)
elseif(_flag MATCHES \"^-F(.*)$\")
# Handle -F/foo/bar flags by recording the framework search paths to be used
# by find_library.
list(APPEND _fw_search_paths \"${CMAKE_MATCH_1}\")
elseif(_framework_flag OR _flag MATCHES \"^-l(.*)$\")
if(_framework_flag)
# Handle Darwin framework bundles passed as -framework Foo
unset(_framework_flag)
set(_lib ${_flag})
else()
# Handle normal libraries passed as -lfoo
@ -100,8 +104,12 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
find_package(Threads REQUIRED)
list(APPEND _lib_deps Threads::Threads)
else()
if(_search_paths)
find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${_search_paths} NO_DEFAULT_PATH)
set(current_search_paths \"${_search_paths}\")
if(_framework_flag)
set(current_search_paths \"${_fw_search_paths}\")
endif()
if(current_search_paths)
find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${current_search_paths} NO_DEFAULT_PATH)
endif()
find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib})
mark_as_advanced(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
@ -112,6 +120,7 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
else()
message(FATAL_ERROR \"Library not found: ${_lib}\")
endif()
unset(_framework_flag)
endif()
elseif(EXISTS \"${_flag}\")
# The flag is an absolute path to an existing library

View File

@ -2,10 +2,21 @@
defineReplace(qtPlatformTargetSuffix) {
suffix =
android: return($${suffix}_$${QT_ARCH})
else: CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac: return($${suffix}_debug)
win32: return($${suffix}d)
win32 {
CONFIG(debug, debug|release) {
mingw {
qtConfig(debug_and_release):build_pass: \
return($${suffix}d)
} else {
!debug_and_release|build_pass: \
return($${suffix}d)
}
}
}
darwin {
CONFIG(debug, debug|release) {
!debug_and_release|build_pass: \
return($${suffix}_debug)
}
}
return($$suffix)

View File

@ -30,7 +30,7 @@ qtFlattenResources()
"{" \
for (resource, RESOURCES) {
resource_name = $$section($$list($$basename(resource)), ., 0, 0)
resource_name = $$replace($$list($$basename(resource)),\.qrc$, )
resource_name = $$replace(resource_name, [^a-zA-Z0-9_], _)
RESOURCE_INIT_CONT += " Q_INIT_RESOURCE($$resource_name);"
}

View File

@ -30,8 +30,8 @@ defineReplace(yaccCommands) {
commands = \
-$(DEL_FILE) $${hpp_output} $${cpp_output}$$escape_expand(\\n\\t) \
$${yacc_call}$$escape_expand(\\n\\t) \
$(MOVE) $${YACC_DIR}/$${QMAKE_YACC_HEADER} $${hpp_output}$$escape_expand(\\n\\t) \
$(MOVE) $${YACC_DIR}/$${QMAKE_YACC_SOURCE} $${cpp_output}$$escape_expand(\\n\\t)
$(MOVE) $$shell_path($${YACC_DIR}/$${QMAKE_YACC_HEADER}) $${hpp_output}$$escape_expand(\\n\\t) \
$(MOVE) $$shell_path($${YACC_DIR}/$${QMAKE_YACC_SOURCE}) $${cpp_output}$$escape_expand(\\n\\t)
silent: commands = @echo Yacc $$1 && $$commands
return($$commands)

View File

@ -0,0 +1,30 @@
From 423d82ac8c7c545e8eac6f70a3e5e92208b7d991 Mon Sep 17 00:00:00 2001
From: Andy Shaw <andy.shaw@qt.io>
Date: Tue, 21 Jan 2020 15:15:00 +0100
Subject: [PATCH] Fix CVE-2019-19880 in SQLite
Fixes: QTBUG-81565
Change-Id: I6bf2364e696315e5262d1abfa2f0b6947f14a33b
---
src/3rdparty/sqlite/sqlite3.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/3rdparty/sqlite/sqlite3.c b/src/3rdparty/sqlite/sqlite3.c
index d5b43857ad..cd1a4d5221 100644
--- a/src/3rdparty/sqlite/sqlite3.c
+++ b/src/3rdparty/sqlite/sqlite3.c
@@ -147620,9 +147620,11 @@ static ExprList *exprListAppendList(
int nInit = pList ? pList->nExpr : 0;
for(i=0; i<pAppend->nExpr; i++){
Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
+ assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
if( bIntToNull && pDup && pDup->op==TK_INTEGER ){
pDup->op = TK_NULL;
pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
+ pDup->u.zToken = 0;
}
pList = sqlite3ExprListAppend(pParse, pList, pDup);
if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
--
2.21.0 (Apple Git-122.2)

View File

@ -147620,9 +147620,11 @@ static ExprList *exprListAppendList(
int nInit = pList ? pList->nExpr : 0;
for(i=0; i<pAppend->nExpr; i++){
Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
if( bIntToNull && pDup && pDup->op==TK_INTEGER ){
pDup->op = TK_NULL;
pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
pDup->u.zToken = 0;
}
pList = sqlite3ExprListAppend(pParse, pList, pDup);
if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;

View File

@ -990,6 +990,30 @@ enum IteratorCapability
RandomAccessCapability = 4
};
enum ContainerCapability
{
ContainerIsAppendable = 1
};
template<typename Container, typename T = void>
struct ContainerCapabilitiesImpl
{
enum {ContainerCapabilities = 0};
using appendFunction = void(*)(const void *container, const void *newElement);
static constexpr const appendFunction appendImpl = nullptr;
};
template<typename Container>
struct ContainerCapabilitiesImpl<Container, decltype(std::declval<Container>().push_back(std::declval<typename Container::value_type>()))>
{
enum {ContainerCapabilities = ContainerIsAppendable};
// The code below invokes undefined behavior if and only if the pointer passed into QSequentialIterableImpl
// pointed to a const object to begin with
static void appendImpl(const void *container, const void *value)
{ static_cast<Container *>(const_cast<void *>(container))->push_back(*static_cast<const typename Container::value_type *>(value)); }
};
template<typename T, typename Category = typename std::iterator_traits<typename T::const_iterator>::iterator_category>
struct CapabilitiesImpl;
@ -1025,6 +1049,12 @@ template<typename T>
struct ContainerAPI<std::list<T> > : CapabilitiesImpl<std::list<T> >
{ static int size(const std::list<T> *t) { return int(t->size()); } };
/*
revision 0: _iteratorCapabilities is simply a uint, where the bits at _revision were never set
revision 1: _iteratorCapabilties is treated as a bitfield, the remaining bits are used to introduce
_revision, _containerCapabilities and _unused. The latter contains 21 bits that are
not used yet
*/
class QSequentialIterableImpl
{
public:
@ -1033,19 +1063,37 @@ public:
int _metaType_id;
uint _metaType_flags;
uint _iteratorCapabilities;
// Iterator capabilities looks actually like
// uint _iteratorCapabilities:4;
// uint _revision:3;
// uint _containerCapabilities:4;
// uint _unused:21;*/
typedef int(*sizeFunc)(const void *p);
typedef const void * (*atFunc)(const void *p, int);
typedef void (*moveIteratorFunc)(const void *p, void **);
enum Position { ToBegin, ToEnd };
typedef void (*moveIteratorFunc2)(const void *p, void **, Position position);
typedef void (*advanceFunc)(void **p, int);
typedef VariantData (*getFunc)( void * const *p, int metaTypeId, uint flags);
typedef void (*destroyIterFunc)(void **p);
typedef bool (*equalIterFunc)(void * const *p, void * const *other);
typedef void (*copyIterFunc)(void **, void * const *);
typedef void(*appendFunction)(const void *container, const void *newElement);
IteratorCapability iteratorCapabilities() {return static_cast<IteratorCapability>(_iteratorCapabilities & 0xF);}
uint revision() {return _iteratorCapabilities >> 4 & 0x7;}
uint containerCapabilities() {return _iteratorCapabilities >> 7 & 0xF;}
sizeFunc _size;
atFunc _at;
moveIteratorFunc _moveToBegin;
moveIteratorFunc _moveToEnd;
union {
moveIteratorFunc _moveToBegin;
moveIteratorFunc2 _moveTo;
};
union {
moveIteratorFunc _moveToEnd;
appendFunction _append;
};
advanceFunc _advance;
getFunc _get;
destroyIterFunc _destroyIter;
@ -1072,6 +1120,15 @@ public:
static void moveToEndImpl(const void *container, void **iterator)
{ IteratorOwner<typename T::const_iterator>::assign(iterator, static_cast<const T*>(container)->end()); }
template<class Container>
static void moveToImpl(const void *container, void **iterator, Position position)
{
if (position == ToBegin)
moveToBeginImpl<Container>(container, iterator);
else
moveToEndImpl<Container>(container, iterator);
}
template<class T>
static VariantData getImpl(void * const *iterator, int metaTypeId, uint flags)
{ return VariantData(metaTypeId, IteratorOwner<typename T::const_iterator>::getData(iterator), flags); }
@ -1082,11 +1139,11 @@ public:
, _iterator(nullptr)
, _metaType_id(qMetaTypeId<typename T::value_type>())
, _metaType_flags(QTypeInfo<typename T::value_type>::isPointer)
, _iteratorCapabilities(ContainerAPI<T>::IteratorCapabilities)
, _iteratorCapabilities(ContainerAPI<T>::IteratorCapabilities | (1 << 4) | (ContainerCapabilitiesImpl<T>::ContainerCapabilities << (4+3)))
, _size(sizeImpl<T>)
, _at(atImpl<T>)
, _moveToBegin(moveToBeginImpl<T>)
, _moveToEnd(moveToEndImpl<T>)
, _moveTo(moveToImpl<T>)
, _append(ContainerCapabilitiesImpl<T>::appendImpl)
, _advance(IteratorOwner<typename T::const_iterator>::advance)
, _get(getImpl<T>)
, _destroyIter(IteratorOwner<typename T::const_iterator>::destroy)
@ -1100,7 +1157,7 @@ public:
, _iterator(nullptr)
, _metaType_id(QMetaType::UnknownType)
, _metaType_flags(0)
, _iteratorCapabilities(0)
, _iteratorCapabilities(0 | (1 << 4) ) // no iterator capabilities, revision 1
, _size(nullptr)
, _at(nullptr)
, _moveToBegin(nullptr)
@ -1113,8 +1170,18 @@ public:
{
}
inline void moveToBegin() { _moveToBegin(_iterable, &_iterator); }
inline void moveToEnd() { _moveToEnd(_iterable, &_iterator); }
inline void moveToBegin() {
if (revision() == 0)
_moveToBegin(_iterable, &_iterator);
else
_moveTo(_iterable, &_iterator, ToBegin);
}
inline void moveToEnd() {
if (revision() == 0)
_moveToEnd(_iterable, &_iterator);
else
_moveTo(_iterable, &_iterator, ToEnd);
}
inline bool equal(const QSequentialIterableImpl&other) const { return _equalIter(&_iterator, &other._iterator); }
inline QSequentialIterableImpl &advance(int i) {
Q_ASSERT(i > 0 || _iteratorCapabilities & BiDirectionalCapability);
@ -1122,6 +1189,11 @@ public:
return *this;
}
inline void append(const void *newElement) {
if (containerCapabilities() & ContainerIsAppendable)
_append(_iterable, newElement);
}
inline VariantData getCurrent() const { return _get(&_iterator, _metaType_id, _metaType_flags); }
VariantData at(int idx) const

View File

@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2018 Intel Corporation
** Copyright (C) 2020 Intel Corporation
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@ -218,6 +218,8 @@ bool QLibraryPrivate::load_sys()
for(int suffix = 0; retry && !pHnd && suffix < suffixes.size(); suffix++) {
if (!prefixes.at(prefix).isEmpty() && name.startsWith(prefixes.at(prefix)))
continue;
if (path.isEmpty() && prefixes.at(prefix).contains(QLatin1Char('/')))
continue;
if (!suffixes.at(suffix).isEmpty() && name.endsWith(suffixes.at(suffix)))
continue;
if (loadHints & QLibrary::LoadArchiveMemberHint) {

View File

@ -342,7 +342,7 @@ static QString locatePlugin(const QString& fileName)
QPluginLoader will automatically look for the file with the appropriate
suffix (see QLibrary::isLibrary()).
When loading the plugin, QPluginLoader searches in the current directory and
When loading the plugin, QPluginLoader searches
in all plugin locations specified by QCoreApplication::libraryPaths(),
unless the file name has an absolute path. After loading the plugin
successfully, fileName() returns the fully-qualified file name of

View File

@ -535,7 +535,7 @@ void QHighDpiScaling::updateHighDpiScaling()
++i;
}
}
m_active = m_globalScalingActive || m_screenFactorSet || m_usePixelDensity;
m_active = m_globalScalingActive || m_screenFactorSet || m_pixelDensityScalingActive;
}
/*

View File

@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@ -2126,6 +2127,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target
/*!
\enum QOpenGLTexture::Target
This enum defines the texture target of a QOpenGLTexture object.
For more information on creating array textures, see \l{Array Texture}.
\value Target1D A 1-dimensional texture.
Equivalent to GL_TEXTURE_1D.
@ -2133,7 +2135,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target
Equivalent to GL_TEXTURE_1D_ARRAY
\value Target2D A 2-dimensional texture.
Equivalent to GL_TEXTURE_2D
\value Target2DArray An array of 1-dimensional textures.
\value Target2DArray An array of 2-dimensional textures.
Equivalent to GL_TEXTURE_2D_ARRAY
\value Target3D A 3-dimensional texture.
Equivalent to GL_TEXTURE_3D

View File

@ -146,7 +146,7 @@ public:
jobjectArray jFiles = static_cast<jobjectArray>(files.object());
const jint nFiles = env->GetArrayLength(jFiles);
for (int i = 0; i < nFiles; ++i) {
AssetItem item{QJNIObjectPrivate(env->GetObjectArrayElement(jFiles, i)).toString()};
AssetItem item{QJNIObjectPrivate::fromLocalRef(env->GetObjectArrayElement(jFiles, i)).toString()};
insert(std::upper_bound(begin(), end(), item, [](const auto &a, const auto &b){
return a.name < b.name;
}), item);

View File

@ -1946,12 +1946,13 @@ void QWindowsWindow::checkForScreenChanged(ScreenChangeMode mode)
if (newScreen == nullptr || newScreen == currentScreen)
return;
// For screens with different DPI: postpone until WM_DPICHANGE
if (mode == FromGeometryChange
// Check on currentScreen as it can be 0 when resuming a session (QTBUG-80436).
if (mode == FromGeometryChange && currentScreen != nullptr
&& !equalDpi(currentScreen->logicalDpi(), newScreen->logicalDpi())) {
return;
}
qCDebug(lcQpaWindows).noquote().nospace() << __FUNCTION__
<< ' ' << window() << " \"" << currentScreen->name()
<< ' ' << window() << " \"" << (currentScreen ? currentScreen->name() : QString())
<< "\"->\"" << newScreen->name() << '"';
if (mode == FromGeometryChange)
setFlag(SynchronousGeometryChangeEvent);

View File

@ -41,7 +41,6 @@
#include "qxcbwindow.h"
#include "qxcbcursor.h"
#include "qxcbimage.h"
#include "qxcbintegration.h"
#include "qnamespace.h"
#include "qxcbxsettings.h"
@ -50,7 +49,6 @@
#include <QDebug>
#include <QtAlgorithms>
#include <qpa/qplatformservices.h>
#include <qpa/qwindowsysteminterface.h>
#include <private/qmath_p.h>
#include <QtGui/private/qhighdpiscaling_p.h>
@ -368,15 +366,6 @@ static QFontEngine::SubpixelAntialiasingType parseXftRgba(const QByteArray& stri
void QXcbVirtualDesktop::readXResources()
{
const QPlatformServices *services = QXcbIntegration::instance()->services();
bool useXftConf = false;
if (services) {
const QList<QByteArray> desktopEnv = services->desktopEnvironment().split(':');
useXftConf = desktopEnv.contains("GNOME") || desktopEnv.contains("UNITY") || desktopEnv.contains("XFCE");
}
if (!useXftConf)
return;
int offset = 0;
QByteArray resources;
while (true) {

View File

@ -417,7 +417,7 @@ Options parseOptions()
options.buildAAB = true;
options.build = true;
options.jarSigner = true;
} else if (options.buildAAB && argument.compare(QLatin1String("--no-build"), Qt::CaseInsensitive) == 0) {
} else if (!options.buildAAB && argument.compare(QLatin1String("--no-build"), Qt::CaseInsensitive) == 0) {
options.build = false;
} else if (argument.compare(QLatin1String("--install"), Qt::CaseInsensitive) == 0) {
options.installApk = true;

View File

@ -281,6 +281,8 @@ private slots:
void shouldDeleteVariantDataWorksForAssociative();
void fromStdVariant();
void qt4UuidDataStream();
void sequentialIterableEndianessSanityCheck();
void sequentialIterableAppend();
void preferDirectConversionOverInterfaces();
@ -5142,6 +5144,28 @@ void tst_QVariant::qt4UuidDataStream()
QCOMPARE(result.value<QUuid>(), source);
}
void tst_QVariant::sequentialIterableEndianessSanityCheck()
{
namespace QMTP = QtMetaTypePrivate;
uint oldIteratorCaps = QMTP::ForwardCapability | QMTP::BiDirectionalCapability | QMTP::RandomAccessCapability;
QMTP::QSequentialIterableImpl seqImpl {};
QCOMPARE(seqImpl.revision(), 1u);
memcpy(&seqImpl._iteratorCapabilities, &oldIteratorCaps, sizeof(oldIteratorCaps));
QCOMPARE(seqImpl.revision(), 0u);
}
void tst_QVariant::sequentialIterableAppend()
{
QVector<int> container {1, 2};
auto variant = QVariant::fromValue(container);
QVERIFY(variant.canConvert<QtMetaTypePrivate::QSequentialIterableImpl>());
auto asIterable = variant.value<QtMetaTypePrivate::QSequentialIterableImpl>();
const int i = 3, j = 4;
asIterable.append(&i);
asIterable.append(&j);
QCOMPARE(variant.value<QVector<int>>(), QVector<int> ({1, 2, 3, 4}));
}
void tst_QVariant::preferDirectConversionOverInterfaces()
{
using namespace QtMetaTypePrivate;