summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.14.174
-rw-r--r--mkspecs/features/android/android.prf2
-rw-r--r--mkspecs/features/create_cmake.prf25
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in15
-rw-r--r--mkspecs/features/qt_functions.prf19
-rw-r--r--mkspecs/features/resources.prf2
-rw-r--r--mkspecs/features/yacc.prf4
-rw-r--r--src/3rdparty/sqlite/patches/0006-Fix-CVE-2019-19880-in-SQLite.patch30
-rw-r--r--src/3rdparty/sqlite/sqlite3.c2
-rw-r--r--src/corelib/kernel/qmetatype.h88
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp4
-rw-r--r--src/corelib/plugin/qpluginloader.cpp2
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp5
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp11
-rw-r--r--src/tools/androiddeployqt/main.cpp2
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp24
18 files changed, 266 insertions, 47 deletions
diff --git a/dist/changes-5.14.1 b/dist/changes-5.14.1
new file mode 100644
index 0000000000..e7e48b5888
--- /dev/null
+++ b/dist/changes-5.14.1
@@ -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.
diff --git a/mkspecs/features/android/android.prf b/mkspecs/features/android/android.prf
index 8290286ec6..6990417536 100644
--- a/mkspecs/features/android/android.prf
+++ b/mkspecs/features/android/android.prf
@@ -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
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 0d93597012..0e71fd0015 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -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 {
@@ -309,27 +312,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 {
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 26d4c17e6c..50364765fb 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -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
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 45d4492788..7777e615bd 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -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)
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index cee0981db0..6d9f27b86b 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -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);"
}
diff --git a/mkspecs/features/yacc.prf b/mkspecs/features/yacc.prf
index 0c7ff7321e..8acb9bc4bd 100644
--- a/mkspecs/features/yacc.prf
+++ b/mkspecs/features/yacc.prf
@@ -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)
diff --git a/src/3rdparty/sqlite/patches/0006-Fix-CVE-2019-19880-in-SQLite.patch b/src/3rdparty/sqlite/patches/0006-Fix-CVE-2019-19880-in-SQLite.patch
new file mode 100644
index 0000000000..fc1c6778c3
--- /dev/null
+++ b/src/3rdparty/sqlite/patches/0006-Fix-CVE-2019-19880-in-SQLite.patch
@@ -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)
+
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;
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index d41f7ee80e..d13fdeb642 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -977,6 +977,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;
@@ -1012,6 +1036,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:
@@ -1020,19 +1050,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;
@@ -1059,6 +1107,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); }
@@ -1069,11 +1126,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)
@@ -1087,7 +1144,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)
@@ -1100,8 +1157,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);
@@ -1109,6 +1176,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
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
index f0de1010d7..135b82cd37 100644
--- a/src/corelib/plugin/qlibrary_unix.cpp
+++ b/src/corelib/plugin/qlibrary_unix.cpp
@@ -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) {
diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
index c2443dbdda..dac8502dae 100644
--- a/src/corelib/plugin/qpluginloader.cpp
+++ b/src/corelib/plugin/qpluginloader.cpp
@@ -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
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index fde6bb0180..671c2d93ef 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -535,7 +535,7 @@ void QHighDpiScaling::updateHighDpiScaling()
++i;
}
}
- m_active = m_globalScalingActive || m_screenFactorSet || m_usePixelDensity;
+ m_active = m_globalScalingActive || m_screenFactorSet || m_pixelDensityScalingActive;
}
/*
diff --git a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
index fcc08ea00d..625473964d 100644
--- a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
+++ b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
@@ -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);
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index ea91e3bb2d..496b18ba1a 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1935,12 +1935,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);
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 44d0bb3f55..e937464c62 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -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) {
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index d993518665..5ac22287e2 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -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;
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 45eb61f6e4..5af1353a0f 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -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;