diff -Naur a/mkspecs/common/android/qplatformdefs.h b/mkspecs/common/android/qplatformdefs.h
--- a/mkspecs/common/android/qplatformdefs.h	2023-10-17 14:50:53.000000000 +0200
+++ b/mkspecs/common/android/qplatformdefs.h	2024-05-09 16:34:52.587982611 +0200
@@ -144,11 +144,7 @@
 #define QT_SIGNAL_ARGS          int
 #define QT_SIGNAL_IGNORE        SIG_IGN
 
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
 #define QT_SOCKLEN_T            socklen_t
-#else
-#define QT_SOCKLEN_T            int
-#endif
 
 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
 #define QT_SNPRINTF             ::snprintf
diff -Naur a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
--- a/mkspecs/linux-clang/qplatformdefs.h	2023-10-17 14:50:53.000000000 +0200
+++ b/mkspecs/linux-clang/qplatformdefs.h	2024-05-09 16:34:52.587982611 +0200
@@ -79,14 +79,6 @@
 #define QT_USE_XOPEN_LFS_EXTENSIONS
 #include "../common/posix/qplatformdefs.h"
 
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T            socklen_t
-#else
-#define QT_SOCKLEN_T            int
-#endif
-
 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
 #define QT_SNPRINTF             ::snprintf
 #define QT_VSNPRINTF            ::vsnprintf
diff -Naur a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
--- a/mkspecs/linux-g++/qplatformdefs.h	2023-10-17 14:50:53.000000000 +0200
+++ b/mkspecs/linux-g++/qplatformdefs.h	2024-05-09 16:34:52.591315966 +0200
@@ -79,14 +79,6 @@
 #define QT_USE_XOPEN_LFS_EXTENSIONS
 #include "../common/posix/qplatformdefs.h"
 
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ < 2)
-#define QT_SOCKLEN_T            int
-#else
-#define QT_SOCKLEN_T            socklen_t
-#endif
-
 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
 #define QT_SNPRINTF             ::snprintf
 #define QT_VSNPRINTF            ::vsnprintf
diff -Naur a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
--- a/mkspecs/linux-llvm/qplatformdefs.h	2023-10-17 14:50:53.000000000 +0200
+++ b/mkspecs/linux-llvm/qplatformdefs.h	2024-05-09 16:34:52.591315966 +0200
@@ -80,14 +80,6 @@
 #define QT_USE_XOPEN_LFS_EXTENSIONS
 #include "../common/posix/qplatformdefs.h"
 
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T            socklen_t
-#else
-#define QT_SOCKLEN_T            int
-#endif
-
 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
 #define QT_SNPRINTF             ::snprintf
 #define QT_VSNPRINTF            ::vsnprintf
diff -Naur a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h	2023-10-17 14:50:53.000000000 +0200
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h	2024-05-09 16:34:52.591315966 +0200
@@ -85,16 +85,9 @@
 #include "../common/posix/qplatformdefs.h"
 
 #undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
 
 #define QT_OPEN_LARGEFILE       0
 
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T            socklen_t
-#else
-#define QT_SOCKLEN_T            int
-#endif
-
 #ifndef SIOCGIFBRDADDR
 #  define SIOCGIFBRDADDR 0x8919
 #endif
diff -Naur a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
--- a/mkspecs/lynxos-g++/qplatformdefs.h	2023-10-17 14:50:53.000000000 +0200
+++ b/mkspecs/lynxos-g++/qplatformdefs.h	2024-05-09 16:34:52.591315966 +0200
@@ -72,14 +72,6 @@
 
 #include "../common/posix/qplatformdefs.h"
 
-#undef QT_SOCKLEN_T
-
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T            socklen_t
-#else
-#define QT_SOCKLEN_T            int
-#endif
-
 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
 #define QT_SNPRINTF             ::snprintf
 #define QT_VSNPRINTF            ::vsnprintf
diff -Naur a/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp b/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp
--- a/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp	2024-05-09 16:34:52.591315966 +0200
@@ -10,6 +10,7 @@
 #include "libANGLE/HandleAllocator.h"
 
 #include <algorithm>
+#include <limits>
 
 #include "common/debug.h"
 
diff -Naur a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
--- a/src/3rdparty/forkfd/forkfd_linux.c	2023-10-17 14:50:53.000000000 +0200
+++ b/src/3rdparty/forkfd/forkfd_linux.c	2024-05-09 16:34:52.591315966 +0200
@@ -82,7 +82,8 @@
     return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid);
 #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
     defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \
-    defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv)
+    defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \
+    defined(__loongarch__)
     /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures,
      * but since both values are 0, there's no harm. */
     return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls);
diff -Naur a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
--- a/src/corelib/global/qglobal.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/global/qglobal.cpp	2024-05-09 16:34:52.591315966 +0200
@@ -97,6 +97,10 @@
 #  include <private/qcore_mac_p.h>
 #endif
 
+#if defined(Q_OS_MACOS)
+#include <QtCore/qversionnumber.h>
+#endif
+
 #ifdef Q_OS_UNIX
 #include <sys/utsname.h>
 #include <private/qcore_unix_p.h>
@@ -2133,6 +2137,15 @@
 static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSystemVersion::current())
 {
 #ifdef Q_OS_MACOS
+    if (version.majorVersion() == 13)
+        return "Ventura";
+    if (version.majorVersion() == 12)
+        return "Monterey";
+    // Compare against predefined constant to handle 10.16/11.0
+    if (QVersionNumber(QOperatingSystemVersion::MacOSBigSur.majorVersion(),
+            QOperatingSystemVersion::MacOSBigSur.minorVersion(), QOperatingSystemVersion::MacOSBigSur.microVersion()).isPrefixOf(
+                QVersionNumber(version.majorVersion(), version.minorVersion(), version.microVersion())))
+        return "Big Sur";
     if (version.majorVersion() == 10) {
         switch (version.minorVersion()) {
         case 9:
@@ -2147,13 +2160,15 @@
             return "High Sierra";
         case 14:
             return "Mojave";
+        case 15:
+            return "Catalina";
         }
     }
     // unknown, future version
 #else
     Q_UNUSED(version);
 #endif
-    return 0;
+    return nullptr;
 }
 #endif
 
@@ -2278,7 +2293,7 @@
     }
 #undef Q_WINVER
     // unknown, future version
-    return 0;
+    return nullptr;
 }
 
 #endif
diff -Naur a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
--- a/src/corelib/global/qglobal.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/global/qglobal.h	2024-05-09 16:34:52.591315966 +0200
@@ -307,6 +307,8 @@
 #  define QT_DEPRECATED_CONSTRUCTOR
 #  undef Q_DECL_ENUMERATOR_DEPRECATED
 #  define Q_DECL_ENUMERATOR_DEPRECATED
+#  undef Q_DECL_ENUMERATOR_DEPRECATED_X
+#  define Q_DECL_ENUMERATOR_DEPRECATED_X(ignored)
 #endif
 
 #ifndef QT_DEPRECATED_WARNINGS_SINCE
diff -Naur a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
--- a/src/corelib/global/qlogging.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/global/qlogging.cpp	2024-05-09 16:34:52.594649321 +0200
@@ -189,6 +189,17 @@
     return ok ? value : 1;
 }
 
+static bool is_fatal_count_down(QAtomicInt &n)
+{
+    // it's fatal if the current value is exactly 1,
+    // otherwise decrement if it's non-zero
+
+    int v = n.loadRelaxed();
+    while (v != 0 && !n.testAndSetRelaxed(v, v - 1, v))
+        ;
+    return v == 1; // we exited the loop, so either v == 0 or CAS succeeded to set n from v to v-1
+}
+
 static bool isFatal(QtMsgType msgType)
 {
     if (msgType == QtFatalMsg)
@@ -196,18 +207,12 @@
 
     if (msgType == QtCriticalMsg) {
         static QAtomicInt fatalCriticals = checked_var_value("QT_FATAL_CRITICALS");
-
-        // it's fatal if the current value is exactly 1,
-        // otherwise decrement if it's non-zero
-        return fatalCriticals.loadRelaxed() && fatalCriticals.fetchAndAddRelaxed(-1) == 1;
+        return is_fatal_count_down(fatalCriticals);
     }
 
     if (msgType == QtWarningMsg || msgType == QtCriticalMsg) {
         static QAtomicInt fatalWarnings = checked_var_value("QT_FATAL_WARNINGS");
-
-        // it's fatal if the current value is exactly 1,
-        // otherwise decrement if it's non-zero
-        return fatalWarnings.loadRelaxed() && fatalWarnings.fetchAndAddRelaxed(-1) == 1;
+        return is_fatal_count_down(fatalWarnings);
     }
 
     return false;
diff -Naur a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
--- a/src/corelib/global/qnamespace.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/global/qnamespace.h	2024-05-09 16:34:52.594649321 +0200
@@ -1867,7 +1867,7 @@
     QT_Q_ENUM(TimerType)
     QT_Q_ENUM(ScrollPhase)
     QT_Q_ENUM(MouseEventSource)
-    QT_Q_FLAG(MouseEventFlag)
+    QT_Q_FLAG(MouseEventFlags)
     QT_Q_ENUM(ChecksumType)
     QT_Q_ENUM(HighDpiScaleFactorRoundingPolicy)
     QT_Q_ENUM(TabFocusBehavior)
diff -Naur a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
--- a/src/corelib/io/qfilesystemengine_win.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/io/qfilesystemengine_win.cpp	2024-05-09 16:34:52.594649321 +0200
@@ -664,14 +664,14 @@
     return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath());
 }
 
-#if defined(Q_CC_MINGW) && WINVER < 0x0602 //  Windows 8 onwards
+#if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8 //  Windows 8 onwards
 
 typedef struct _FILE_ID_INFO {
     ULONGLONG VolumeSerialNumber;
     FILE_ID_128 FileId;
 } FILE_ID_INFO, *PFILE_ID_INFO;
 
-#endif // if defined (Q_CC_MINGW) && WINVER < 0x0602
+#endif // if defined(Q_CC_MINGW) && WINVER < 0x0602 && _WIN32_WINNT < _WIN32_WINNT_WIN8
 
 // File ID for Windows up to version 7 and FAT32 drives
 static inline QByteArray fileId(HANDLE handle)
diff -Naur a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp	2024-05-09 16:34:52.594649321 +0200
@@ -366,7 +366,9 @@
     // qDebug("QInotifyFileSystemWatcherEngine::readFromInotify");
 
     int buffSize = 0;
-    ioctl(inotifyFd, FIONREAD, (char *) &buffSize);
+    if (ioctl(inotifyFd, FIONREAD, (char *) &buffSize) == -1 || buffSize == 0)
+        return;
+
     QVarLengthArray<char, 4096> buffer(buffSize);
     buffSize = read(inotifyFd, buffer.data(), buffSize);
     char *at = buffer.data();
diff -Naur a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
--- a/src/corelib/io/qfsfileengine.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/io/qfsfileengine.cpp	2024-05-09 16:34:52.594649321 +0200
@@ -361,7 +361,7 @@
 
     // Seek to the end when in Append mode.
     if (openMode & QFile::Append) {
-        int ret;
+        QT_OFF_T ret;
         do {
             ret = QT_LSEEK(fd, 0, SEEK_END);
         } while (ret == -1 && errno == EINTR);
diff -Naur a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
--- a/src/corelib/io/qfsfileengine_unix.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/io/qfsfileengine_unix.cpp	2024-05-09 16:34:52.594649321 +0200
@@ -141,7 +141,7 @@
 
         // Seek to the end when in Append mode.
         if (flags & QFile::Append) {
-            int ret;
+            QT_OFF_T ret;
             do {
                 ret = QT_LSEEK(fd, 0, SEEK_END);
             } while (ret == -1 && errno == EINTR);
diff -Naur a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp	2024-05-09 16:34:52.597982676 +0200
@@ -52,6 +52,8 @@
 #include <qdatetime.h>
 #include <qloggingcategory.h>
 
+#include <functional>
+
 #include <limits.h>
 
 QT_BEGIN_NAMESPACE
@@ -213,7 +215,7 @@
     if (d && other.d)
         return d->index < other.d->index;
 
-    return d < other.d;
+    return std::less<>{}(d, other.d);
 }
 
 /*!
diff -Naur a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp	2024-05-09 16:34:52.597982676 +0200
@@ -939,8 +939,9 @@
                 q->beginInsertColumns(proxy_parent, proxy_start, proxy_end);
         }
 
-        for (int i = 0; i < source_items.size(); ++i)
-            proxy_to_source.insert(proxy_start + i, source_items.at(i));
+        // TODO: use the range QList::insert() overload once it is implemented (QTBUG-58633).
+        proxy_to_source.insert(proxy_start, source_items.size(), 0);
+        std::copy(source_items.cbegin(), source_items.cend(), proxy_to_source.begin() + proxy_start);
 
         build_source_to_proxy_mapping(proxy_to_source, source_to_proxy);
 
@@ -3131,8 +3132,9 @@
 
     if (d->filter_data.isEmpty())
         return true;
+
+    int column_count = d->model->columnCount(source_parent);
     if (d->filter_column == -1) {
-        int column_count = d->model->columnCount(source_parent);
         for (int column = 0; column < column_count; ++column) {
             QModelIndex source_index = d->model->index(source_row, column, source_parent);
             QString key = d->model->data(source_index, d->filter_role).toString();
@@ -3141,9 +3143,10 @@
         }
         return false;
     }
-    QModelIndex source_index = d->model->index(source_row, d->filter_column, source_parent);
-    if (!source_index.isValid()) // the column may not exist
+
+    if (d->filter_column >= column_count) // the column may not exist
         return true;
+    QModelIndex source_index = d->model->index(source_row, d->filter_column, source_parent);
     QString key = d->model->data(source_index, d->filter_role).toString();
     return d->filter_data.hasMatch(key);
 }
diff -Naur a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
--- a/src/corelib/kernel/qtranslator.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/kernel/qtranslator.cpp	2024-05-09 16:34:52.597982676 +0200
@@ -907,7 +907,7 @@
             goto end;
         case Tag_Translation: {
             int len = read32(m);
-            if (len % 1)
+            if (len & 1)
                 return QString();
             m += 4;
             if (!numerus--) {
diff -Naur a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
--- a/src/corelib/mimetypes/qmimedatabase.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/mimetypes/qmimedatabase.cpp	2024-05-09 16:34:52.597982676 +0200
@@ -46,6 +46,9 @@
 #include "qmimeprovider_p.h"
 #include "qmimetype_p.h"
 
+#include <private/qduplicatetracker_p.h>
+#include <private/qfilesystementry_p.h>
+
 #include <QtCore/QFile>
 #include <QtCore/QFileInfo>
 #include <QtCore/QSet>
@@ -389,20 +392,23 @@
         // Disambiguate conflicting extensions (if magic matching found something)
         if (candidateByData.isValid() && magicAccuracy > 0) {
             const QString sniffedMime = candidateByData.name();
-            // If the sniffedMime matches a glob match, use it
+            // If the sniffedMime matches a highest-weight glob match, use it
             if (candidatesByName.m_matchingMimeTypes.contains(sniffedMime)) {
                 *accuracyPtr = 100;
                 return candidateByData;
             }
-            for (const QString &m : qAsConst(candidatesByName.m_matchingMimeTypes)) {
+            for (const QString &m : qAsConst(candidatesByName.m_allMatchingMimeTypes)) {
                 if (inherits(m, sniffedMime)) {
                     // We have magic + pattern pointing to this, so it's a pretty good match
                     *accuracyPtr = 100;
                     return mimeTypeForName(m);
                 }
             }
-            *accuracyPtr = magicAccuracy;
-            return candidateByData;
+            if (candidatesByName.m_allMatchingMimeTypes.isEmpty()) {
+                // No glob, use magic
+                *accuracyPtr = magicAccuracy;
+                return candidateByData;
+            }
         }
     }
 
@@ -428,6 +434,7 @@
 bool QMimeDatabasePrivate::inherits(const QString &mime, const QString &parent)
 {
     const QString resolvedParent = resolveAlias(parent);
+    QDuplicateTracker<QString> seen;
     std::stack<QString, QStringList> toCheck;
     toCheck.push(mime);
     while (!toCheck.empty()) {
@@ -436,8 +443,11 @@
         const QString mimeName = toCheck.top();
         toCheck.pop();
         const auto parentList = parents(mimeName);
-        for (const QString &par : parentList)
-            toCheck.push(resolveAlias(par));
+        for (const QString &par : parentList) {
+            const QString resolvedPar = resolveAlias(par);
+            if (!seen.hasSeen(resolvedPar))
+                toCheck.push(resolvedPar);
+        }
     }
     return false;
 }
diff -Naur a/src/corelib/mimetypes/qmimeglobpattern.cpp b/src/corelib/mimetypes/qmimeglobpattern.cpp
--- a/src/corelib/mimetypes/qmimeglobpattern.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/mimetypes/qmimeglobpattern.cpp	2024-05-09 16:34:52.597982676 +0200
@@ -83,7 +83,10 @@
     }
     if (!m_matchingMimeTypes.contains(mimeType)) {
         m_matchingMimeTypes.append(mimeType);
-        m_allMatchingMimeTypes.append(mimeType);
+        if (replace)
+            m_allMatchingMimeTypes.prepend(mimeType); // highest-weight first
+        else
+            m_allMatchingMimeTypes.append(mimeType);
         m_knownSuffixLength = knownSuffixLength;
     }
 }
diff -Naur a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
--- a/src/corelib/mimetypes/qmimeprovider.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/mimetypes/qmimeprovider.cpp	2024-05-09 16:34:52.597982676 +0200
@@ -242,21 +242,28 @@
         return;
     Q_ASSERT(m_cacheFile);
     const QString lowerFileName = fileName.toLower();
+    int numMatches = 0;
     // Check literals (e.g. "Makefile")
-    matchGlobList(result, m_cacheFile, m_cacheFile->getUint32(PosLiteralListOffset), fileName);
-    // Check complex globs (e.g. "callgrind.out[0-9]*")
-    matchGlobList(result, m_cacheFile, m_cacheFile->getUint32(PosGlobListOffset), fileName);
+    numMatches = matchGlobList(result, m_cacheFile, m_cacheFile->getUint32(PosLiteralListOffset), fileName);
     // Check the very common *.txt cases with the suffix tree
-    const int reverseSuffixTreeOffset = m_cacheFile->getUint32(PosReverseSuffixTreeOffset);
-    const int numRoots = m_cacheFile->getUint32(reverseSuffixTreeOffset);
-    const int firstRootOffset = m_cacheFile->getUint32(reverseSuffixTreeOffset + 4);
-    matchSuffixTree(result, m_cacheFile, numRoots, firstRootOffset, lowerFileName, lowerFileName.length() - 1, false);
-    if (result.m_matchingMimeTypes.isEmpty())
-        matchSuffixTree(result, m_cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true);
+    if (numMatches == 0) {
+        const int reverseSuffixTreeOffset = m_cacheFile->getUint32(PosReverseSuffixTreeOffset);
+        const int numRoots = m_cacheFile->getUint32(reverseSuffixTreeOffset);
+        const int firstRootOffset = m_cacheFile->getUint32(reverseSuffixTreeOffset + 4);
+        if (matchSuffixTree(result, m_cacheFile, numRoots, firstRootOffset, lowerFileName, lowerFileName.length() - 1, false)) {
+            ++numMatches;
+        } else if (matchSuffixTree(result, m_cacheFile, numRoots, firstRootOffset, fileName, fileName.length() - 1, true)) {
+            ++numMatches;
+        }
+    }
+    // Check complex globs (e.g. "callgrind.out[0-9]*" or "README*")
+    if (numMatches == 0)
+        matchGlobList(result, m_cacheFile, m_cacheFile->getUint32(PosGlobListOffset), fileName);
 }
 
-void QMimeBinaryProvider::matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int off, const QString &fileName)
+int QMimeBinaryProvider::matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int off, const QString &fileName)
 {
+    int numMatches = 0;
     const int numGlobs = cacheFile->getUint32(off);
     //qDebug() << "Loading" << numGlobs << "globs from" << cacheFile->file.fileName() << "at offset" << cacheFile->globListOffset;
     for (int i = 0; i < numGlobs; ++i) {
@@ -272,9 +279,12 @@
         //qDebug() << pattern << mimeType << weight << caseSensitive;
         QMimeGlobPattern glob(pattern, QString() /*unused*/, weight, qtCaseSensitive);
 
-        if (glob.matchFileName(fileName))
+        if (glob.matchFileName(fileName)) {
             result.addMatch(QLatin1String(mimeType), weight, pattern);
+            ++numMatches;
+        }
     }
+    return numMatches;
 }
 
 bool QMimeBinaryProvider::matchSuffixTree(QMimeGlobMatchResult &result, QMimeBinaryProvider::CacheFile *cacheFile, int numEntries, int firstOffset, const QString &fileName, int charPos, bool caseSensitiveCheck)
diff -Naur a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h
--- a/src/corelib/mimetypes/qmimeprovider_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/mimetypes/qmimeprovider_p.h	2024-05-09 16:34:52.601316032 +0200
@@ -115,7 +115,7 @@
 private:
     struct CacheFile;
 
-    void matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int offset, const QString &fileName);
+    int matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int offset, const QString &fileName);
     bool matchSuffixTree(QMimeGlobMatchResult &result, CacheFile *cacheFile, int numEntries, int firstOffset, const QString &fileName, int charPos, bool caseSensitiveCheck);
     bool matchMagicRule(CacheFile *cacheFile, int numMatchlets, int firstOffset, const QByteArray &data);
     QLatin1String iconForMime(CacheFile *cacheFile, int posListOffset, const QByteArray &inputMime);
diff -Naur a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp
--- a/src/corelib/mimetypes/qmimetype.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/mimetypes/qmimetype.cpp	2024-05-09 16:34:52.601316032 +0200
@@ -376,14 +376,17 @@
 static void collectParentMimeTypes(const QString &mime, QStringList &allParents)
 {
     const QStringList parents = QMimeDatabasePrivate::instance()->mimeParents(mime);
+    QStringList newParents;
     for (const QString &parent : parents) {
         // I would use QSet, but since order matters I better not
-        if (!allParents.contains(parent))
+        if (!allParents.contains(parent)) {
             allParents.append(parent);
+            newParents.append(parent);
+        }
     }
     // We want a breadth-first search, so that the least-specific parent (octet-stream) is last
     // This means iterating twice, unfortunately.
-    for (const QString &parent : parents)
+    for (const QString &parent : newParents)
         collectParentMimeTypes(parent, allParents);
 }
 
diff -Naur a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
--- a/src/corelib/plugin/qlibrary.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/plugin/qlibrary.cpp	2024-05-09 16:34:52.601316032 +0200
@@ -526,7 +526,7 @@
     if (pHnd.loadRelaxed())
         return;
 
-    loadHintsInt.storeRelaxed(lh);
+    loadHintsInt.fetchAndOrRelaxed(lh);
 }
 
 QFunctionPointer QLibraryPrivate::resolve(const char *symbol)
@@ -538,6 +538,13 @@
 
 void QLibraryPrivate::setLoadHints(QLibrary::LoadHints lh)
 {
+    // Set the load hints directly for a dummy if this object is not associated
+    // with a file. Such object is not shared between multiple instances.
+    if (fileName.isEmpty()) {
+        loadHintsInt.storeRelaxed(lh);
+        return;
+    }
+
     // this locks a global mutex
     QMutexLocker lock(&qt_library_mutex);
     mergeLoadHints(lh);
@@ -1166,6 +1173,10 @@
     lazy symbol resolution, and will not export external symbols for resolution
     in other dynamically-loaded libraries.
 
+    \note Hints can only be cleared when this object is not associated with a
+    file. Hints can only be added once the file name is set (\a hints will
+    be or'ed with the old hints).
+
     \note Setting this property after the library has been loaded has no effect
     and loadHints() will not reflect those changes.
 
diff -Naur a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
--- a/src/corelib/plugin/qpluginloader.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/plugin/qpluginloader.cpp	2024-05-09 16:34:52.601316032 +0200
@@ -105,6 +105,8 @@
     \sa QLibrary, {Plug & Paint Example}
 */
 
+static constexpr QLibrary::LoadHints defaultLoadHints = QLibrary::PreventUnloadHint;
+
 /*!
     \class QStaticPlugin
     \inmodule QtCore
@@ -155,7 +157,7 @@
     : QObject(parent), d(nullptr), did_load(false)
 {
     setFileName(fileName);
-    setLoadHints(QLibrary::PreventUnloadHint);
+    setLoadHints(defaultLoadHints);
 }
 
 /*!
@@ -357,7 +359,7 @@
 void QPluginLoader::setFileName(const QString &fileName)
 {
 #if defined(QT_SHARED)
-    QLibrary::LoadHints lh = QLibrary::PreventUnloadHint;
+    QLibrary::LoadHints lh = defaultLoadHints;
     if (d) {
         lh = d->loadHints();
         d->release();
@@ -414,15 +416,21 @@
 void QPluginLoader::setLoadHints(QLibrary::LoadHints loadHints)
 {
     if (!d) {
-        d = QLibraryPrivate::findOrCreate(QString());   // ugly, but we need a d-ptr
+        d = QLibraryPrivate::findOrCreate({}, {}, loadHints); // ugly, but we need a d-ptr
         d->errorString.clear();
+    } else {
+        d->setLoadHints(loadHints);
     }
-    d->setLoadHints(loadHints);
 }
 
 QLibrary::LoadHints QPluginLoader::loadHints() const
 {
-    return d ? d->loadHints() : QLibrary::LoadHints();
+    // Not having a d-pointer means that the user hasn't called
+    // setLoadHints() / setFileName() yet. In setFileName() we will
+    // then force defaultLoadHints on loading, so we must return them
+    // from here as well.
+
+    return d ? d->loadHints() : defaultLoadHints;
 }
 
 #endif // QT_CONFIG(library)
diff -Naur a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
--- a/src/corelib/serialization/qcborvalue.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/serialization/qcborvalue.cpp	2024-05-09 16:34:52.601316032 +0200
@@ -2123,7 +2123,8 @@
     Q_ASSERT(n == -1 || container == nullptr);
     if (n < 0)
         dd = container;
-    return dd ? QCborArray(*dd) : defaultValue;
+    // return QCborArray(*dd); but that's UB if dd is nullptr
+    return dd ? QCborArray(*dd) : QCborArray();
 }
 
 /*!
@@ -2165,7 +2166,8 @@
     Q_ASSERT(n == -1 || container == nullptr);
     if (n < 0)
         dd = container;
-    return dd ? QCborMap(*dd) : defaultValue;
+    // return QCborMap(*dd); but that's UB if dd is nullptr
+    return dd ? QCborMap(*dd) : QCborMap();
 }
 
 /*!
diff -Naur a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
--- a/src/corelib/serialization/qxmlstream.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/serialization/qxmlstream.cpp	2024-05-09 16:34:52.601316032 +0200
@@ -160,7 +160,7 @@
     addData() or by waiting for it to arrive on the device().
 
     \value UnexpectedElementError The parser encountered an element
-    that was different to those it expected.
+    or token that was different to those it expected.
 
 */
 
@@ -295,13 +295,34 @@
 
   QXmlStreamReader is a well-formed XML 1.0 parser that does \e not
   include external parsed entities. As long as no error occurs, the
-  application code can thus be assured that the data provided by the
-  stream reader satisfies the W3C's criteria for well-formed XML. For
-  example, you can be certain that all tags are indeed nested and
-  closed properly, that references to internal entities have been
-  replaced with the correct replacement text, and that attributes have
-  been normalized or added according to the internal subset of the
-  DTD.
+  application code can thus be assured, that
+  \list
+  \li the data provided by the stream reader satisfies the W3C's
+      criteria for well-formed XML,
+  \li tokens are provided in a valid order.
+  \endlist
+
+  Unless QXmlStreamReader raises an error, it guarantees the following:
+  \list
+  \li All tags are nested and closed properly.
+  \li References to internal entities have been replaced with the
+      correct replacement text.
+  \li Attributes have been normalized or added according to the
+      internal subset of the \l DTD.
+  \li Tokens of type \l StartDocument happen before all others,
+      aside from comments and processing instructions.
+  \li At most one DOCTYPE element (a token of type \l DTD) is present.
+  \li If present, the DOCTYPE appears before all other elements,
+      aside from StartDocument, comments and processing instructions.
+  \endlist
+
+  In particular, once any token of type \l StartElement, \l EndElement,
+  \l Characters, \l EntityReference or \l EndDocument is seen, no
+  tokens of type StartDocument or DTD will be seen. If one is present in
+  the input stream, out of order, an error is raised.
+
+  \note The token types \l Comment and \l ProcessingInstruction may appear
+  anywhere in the stream.
 
   If an error occurs while parsing, atEnd() and hasError() return
   true, and error() returns the error that occurred. The functions
@@ -620,6 +641,7 @@
         d->token = -1;
         return readNext();
     }
+    d->checkToken();
     return d->type;
 }
 
@@ -740,6 +762,14 @@
 };
 
 
+static const char QXmlStreamReader_XmlContextString[] =
+    "Prolog\0"
+    "Body\0";
+
+static const short QXmlStreamReader_XmlContextString_indices[] = {
+    0, 7
+};
+
 /*!
     \property  QXmlStreamReader::namespaceProcessing
     The namespace-processing flag of the stream reader
@@ -775,6 +805,16 @@
                          QXmlStreamReader_tokenTypeString_indices[d->type]);
 }
 
+/*!
+   \internal
+   \return \param ctxt (Prolog/Body) as a string.
+ */
+QString contextString(QXmlStreamReaderPrivate::XmlContext ctxt)
+{
+    return QLatin1String(QXmlStreamReader_XmlContextString +
+                         QXmlStreamReader_XmlContextString_indices[static_cast<int>(ctxt)]);
+}
+
 #endif // QT_NO_XMLSTREAMREADER
 
 QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack()
@@ -866,6 +906,8 @@
 
     type = QXmlStreamReader::NoToken;
     error = QXmlStreamReader::NoError;
+    currentContext = XmlContext::Prolog;
+    foundDTD = false;
 }
 
 /*
@@ -1302,15 +1344,18 @@
     return n;
 }
 
-inline int QXmlStreamReaderPrivate::fastScanName(int *prefix)
+// Fast scan an XML attribute name (e.g. "xml:lang").
+inline QXmlStreamReaderPrivate::FastScanNameResult
+QXmlStreamReaderPrivate::fastScanName(Value *val)
 {
     int n = 0;
     uint c;
     while ((c = getChar()) != StreamEOF) {
         if (n >= 4096) {
             // This is too long to be a sensible name, and
-            // can exhaust memory
-            return 0;
+            // can exhaust memory, or the range of decltype(*prefix)
+            raiseNamePrefixTooLongError();
+            return {};
         }
         switch (c) {
         case '\n':
@@ -1339,23 +1384,23 @@
         case '+':
         case '*':
             putChar(c);
-            if (prefix && *prefix == n+1) {
-                *prefix = 0;
+            if (val && val->prefix == n + 1) {
+                val->prefix = 0;
                 putChar(':');
                 --n;
             }
-            return n;
+            return FastScanNameResult(n);
         case ':':
-            if (prefix) {
-                if (*prefix == 0) {
-                    *prefix = n+2;
+            if (val) {
+                if (val->prefix == 0) {
+                    val->prefix = n + 2;
                 } else { // only one colon allowed according to the namespace spec.
                     putChar(c);
-                    return n;
+                    return FastScanNameResult(n);
                 }
             } else {
                 putChar(c);
-                return n;
+                return FastScanNameResult(n);
             }
             Q_FALLTHROUGH();
         default:
@@ -1364,12 +1409,12 @@
         }
     }
 
-    if (prefix)
-        *prefix = 0;
+    if (val)
+        val->prefix = 0;
     int pos = textBuffer.size() - n;
     putString(textBuffer, pos);
     textBuffer.resize(pos);
-    return 0;
+    return FastScanNameResult(0);
 }
 
 enum NameChar { NameBeginning, NameNotBeginning, NotName };
@@ -1878,6 +1923,14 @@
     raiseError(QXmlStreamReader::NotWellFormedError, message);
 }
 
+void QXmlStreamReaderPrivate::raiseNamePrefixTooLongError()
+{
+    // TODO: add a ImplementationLimitsExceededError and use it instead
+    raiseError(QXmlStreamReader::NotWellFormedError,
+               QXmlStream::tr("Length of XML attribute name exceeds implementation limits (4KiB "
+                              "characters)."));
+}
+
 void QXmlStreamReaderPrivate::parseError()
 {
 
@@ -4050,6 +4103,92 @@
     }
 }
 
+static bool isTokenAllowedInContext(QXmlStreamReader::TokenType type,
+                                               QXmlStreamReaderPrivate::XmlContext loc)
+{
+    switch (type) {
+    case QXmlStreamReader::StartDocument:
+    case QXmlStreamReader::DTD:
+        return loc == QXmlStreamReaderPrivate::XmlContext::Prolog;
+
+    case QXmlStreamReader::StartElement:
+    case QXmlStreamReader::EndElement:
+    case QXmlStreamReader::Characters:
+    case QXmlStreamReader::EntityReference:
+    case QXmlStreamReader::EndDocument:
+        return loc == QXmlStreamReaderPrivate::XmlContext::Body;
+
+    case QXmlStreamReader::Comment:
+    case QXmlStreamReader::ProcessingInstruction:
+        return true;
+
+    case QXmlStreamReader::NoToken:
+    case QXmlStreamReader::Invalid:
+        return false;
+    default:
+        return false;
+    }
+}
+
+/*!
+   \internal
+   \brief QXmlStreamReader::isValidToken
+   \return \c true if \param type is a valid token type.
+   \return \c false if \param type is an unexpected token,
+   which indicates a non-well-formed or invalid XML stream.
+ */
+bool QXmlStreamReaderPrivate::isValidToken(QXmlStreamReader::TokenType type)
+{
+    // Don't change currentContext, if Invalid or NoToken occur in the prolog
+    if (type == QXmlStreamReader::Invalid || type == QXmlStreamReader::NoToken)
+        return false;
+
+    // If a token type gets rejected in the body, there is no recovery
+    const bool result = isTokenAllowedInContext(type, currentContext);
+    if (result || currentContext == XmlContext::Body)
+        return result;
+
+    // First non-Prolog token observed => switch context to body and check again.
+    currentContext = XmlContext::Body;
+    return isTokenAllowedInContext(type, currentContext);
+}
+
+/*!
+   \internal
+   Checks token type and raises an error, if it is invalid
+   in the current context (prolog/body).
+ */
+void QXmlStreamReaderPrivate::checkToken()
+{
+    Q_Q(QXmlStreamReader);
+
+    // The token type must be consumed, to keep track if the body has been reached.
+    const XmlContext context = currentContext;
+    const bool ok = isValidToken(type);
+
+    // Do nothing if an error has been raised already (going along with an unexpected token)
+    if (error != QXmlStreamReader::Error::NoError)
+        return;
+
+    if (!ok) {
+        raiseError(QXmlStreamReader::UnexpectedElementError,
+                   QLatin1String("Unexpected token type %1 in %2.")
+                   .arg(q->tokenString(), contextString(context)));
+        return;
+    }
+
+    if (type != QXmlStreamReader::DTD)
+        return;
+
+    // Raise error on multiple DTD tokens
+    if (foundDTD) {
+        raiseError(QXmlStreamReader::UnexpectedElementError,
+                   QLatin1String("Found second DTD token in %1.").arg(contextString(context)));
+    } else {
+        foundDTD = true;
+    }
+}
+
 /*!
  \fn bool QXmlStreamAttributes::hasAttribute(const QString &qualifiedName) const
  \since 4.5
diff -Naur a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
--- a/src/corelib/serialization/qxmlstream.g	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/serialization/qxmlstream.g	2024-05-09 16:34:52.604649387 +0200
@@ -516,7 +516,16 @@
     int fastScanLiteralContent();
     int fastScanSpace();
     int fastScanContentCharList();
-    int fastScanName(int *prefix = nullptr);
+
+    struct FastScanNameResult {
+        FastScanNameResult() : ok(false) {}
+        explicit FastScanNameResult(int len) : addToLen(len), ok(true) { }
+        operator bool() { return ok; }
+        int operator*() { Q_ASSERT(ok); return addToLen; }
+        int addToLen;
+        bool ok;
+    };
+    FastScanNameResult fastScanName(Value *val = nullptr);
     inline int fastScanNMTOKEN();
 
 
@@ -525,6 +534,7 @@
 
     void raiseError(QXmlStreamReader::Error error, const QString& message = QString());
     void raiseWellFormedError(const QString &message);
+    void raiseNamePrefixTooLongError();
 
     QXmlStreamEntityResolver *entityResolver;
 
@@ -1811,7 +1821,12 @@
 qname ::= LETTER;
 /.
         case $rule_number: {
-            sym(1).len += fastScanName(&sym(1).prefix);
+            Value &val = sym(1);
+            if (auto res = fastScanName(&val))
+                val.len += *res;
+            else
+                return false;
+
             if (atEnd) {
                 resume($rule_number);
                 return false;
@@ -1822,7 +1837,11 @@
 name ::= LETTER;
 /.
         case $rule_number:
-            sym(1).len += fastScanName();
+            if (auto res = fastScanName())
+                sym(1).len += *res;
+            else
+                return false;
+
             if (atEnd) {
                 resume($rule_number);
                 return false;
diff -Naur a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
--- a/src/corelib/serialization/qxmlstream_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/serialization/qxmlstream_p.h	2024-05-09 16:34:52.604649387 +0200
@@ -804,6 +804,17 @@
 #endif
     bool atEnd;
 
+    enum class XmlContext
+    {
+        Prolog,
+        Body,
+    };
+
+    XmlContext currentContext = XmlContext::Prolog;
+    bool foundDTD = false;
+    bool isValidToken(QXmlStreamReader::TokenType type);
+    void checkToken();
+
     /*!
       \sa setType()
      */
@@ -1005,7 +1016,16 @@
     int fastScanLiteralContent();
     int fastScanSpace();
     int fastScanContentCharList();
-    int fastScanName(int *prefix = nullptr);
+
+    struct FastScanNameResult {
+        FastScanNameResult() : ok(false) {}
+        explicit FastScanNameResult(int len) : addToLen(len), ok(true) { }
+        operator bool() { return ok; }
+        int operator*() { Q_ASSERT(ok); return addToLen; }
+        int addToLen;
+        bool ok;
+    };
+    FastScanNameResult fastScanName(Value *val = nullptr);
     inline int fastScanNMTOKEN();
 
 
@@ -1014,6 +1034,7 @@
 
     void raiseError(QXmlStreamReader::Error error, const QString& message = QString());
     void raiseWellFormedError(const QString &message);
+    void raiseNamePrefixTooLongError();
 
     QXmlStreamEntityResolver *entityResolver;
 
@@ -1939,7 +1960,12 @@
         break;
 
         case 262: {
-            sym(1).len += fastScanName(&sym(1).prefix);
+            Value &val = sym(1);
+            if (auto res = fastScanName(&val))
+                val.len += *res;
+            else
+                return false;
+
             if (atEnd) {
                 resume(262);
                 return false;
@@ -1947,7 +1973,11 @@
         } break;
 
         case 263:
-            sym(1).len += fastScanName();
+            if (auto res = fastScanName())
+                sym(1).len += *res;
+            else
+                return false;
+
             if (atEnd) {
                 resume(263);
                 return false;
diff -Naur a/src/corelib/text/qlocale_data_p.h b/src/corelib/text/qlocale_data_p.h
--- a/src/corelib/text/qlocale_data_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/text/qlocale_data_p.h	2024-05-09 16:34:52.604649387 +0200
@@ -1340,7 +1340,7 @@
     {     25,     6,   126,    46,    44,    59,    37,    48,    45,    43,   101,   12300,   12301,   12302,   12303,     166,5 ,     166,5 ,     176,5 ,     176,5 ,     415,8 ,    402,13 ,     209,6 ,    226,13 ,   2022,21 ,   1980,28 ,   2008,14 ,   2022,21 ,   1980,28 ,   2008,14 ,      58,2 ,      55,2 ,  283,3 ,   5,17 ,  22,23 , {77,79,80},      137,4 ,   3174,13 ,       4,4 ,      13,6 ,     589,4 ,     602,9 ,     2,     1,     7,     6,     7 }, // Chinese/Traditional Han/Macau
     {     25,     6,   208,    46,    44,    59,    37,    48,    45,    43,   101,   12300,   12301,   12302,   12303,     166,5 ,     166,5 ,     171,5 ,     171,5 ,     394,8 ,    423,14 ,     209,6 ,    226,13 ,   2022,21 ,   1980,28 ,   2008,14 ,   2022,21 ,   1980,28 ,   2008,14 ,      58,2 ,      55,2 ,   45,4 ,   5,17 ,  22,23 , {84,87,68},        6,1 ,   3187,13 ,       4,4 ,      13,6 ,     589,4 ,     611,2 ,     2,     0,     7,     6,     7 }, // Chinese/Traditional Han/Taiwan
     {     26,     7,    74,    46,    44,    59,    37,    48,    45,    43,   101,    8220,    8221,    8216,    8217,       0,6 ,       0,6 ,       0,6 ,       0,6 ,     53,10 ,     63,17 ,      37,5 ,      8,10 ,      0,28 ,      0,28 ,     85,14 ,      0,28 ,      0,28 ,     85,14 ,       0,2 ,       0,2 ,   45,4 ,   5,17 ,  22,23 , {69,85,82},       14,1 ,       0,7 ,       8,5 ,       4,0 ,       0,0 ,       0,0 ,     2,     1,     1,     6,     7 }, // Corsican/Latin/France
-    {     27,     7,    54,    44,    46,    59,    37,    48,  8722,    43,   101,    8222,    8220,    8218,    8216,       0,6 ,       0,6 ,     159,7 ,     159,7 ,    437,13 ,    450,19 ,      37,5 ,     87,12 ,   2043,28 ,   2071,58 ,   2129,14 ,   2043,28 ,   2071,58 ,   2143,14 ,       0,2 ,       0,2 ,  286,7 ,   5,17 ,  22,23 , {72,82,75},      141,3 ,   3200,60 ,      19,5 ,       4,0 ,     613,8 ,     621,8 ,     2,     1,     1,     6,     7 }, // Croatian/Latin/Croatia
+    {     27,     7,    54,    44,    46,    59,    37,    48,  8722,    43,   101,    8222,    8220,    8218,    8216,       0,6 ,       0,6 ,     159,7 ,     159,7 ,    437,13 ,    450,19 ,      37,5 ,     87,12 ,   2043,28 ,   2071,58 ,   2129,14 ,   2043,28 ,   2071,58 ,   2143,14 ,       0,2 ,       0,2 ,  286,7 ,   5,17 ,  22,23 , {69,85,82},       14,1 ,   3455,19 ,      19,5 ,       4,0 ,     613,8 ,     621,8 ,     2,     1,     1,     6,     7 }, // Croatian/Latin/Croatia
     {     27,     7,    27,    44,    46,    59,    37,    48,  8722,    43,   101,    8222,    8220,    8218,    8216,       0,6 ,       0,6 ,     159,7 ,     159,7 ,     469,9 ,    450,19 ,      37,5 ,     87,12 ,   2043,28 ,   2071,58 ,   2143,14 ,   2043,28 ,   2071,58 ,   2143,14 ,       0,2 ,       0,2 ,  286,7 ,   5,17 ,  22,23 , {66,65,77},      144,2 ,   3260,85 ,      19,5 ,       4,0 ,     613,8 ,    629,19 ,     2,     1,     1,     6,     7 }, // Croatian/Latin/Bosnia And Herzegowina
     {     28,     7,    57,    44,   160,    59,    37,    48,    45,    43,   101,    8222,    8220,    8218,    8216,       0,6 ,       0,6 ,     181,7 ,     181,7 ,     156,8 ,    478,17 ,      55,4 ,      59,9 ,   2157,21 ,   2178,49 ,   2227,14 ,   2157,21 ,   2178,49 ,   2227,14 ,      60,4 ,      57,4 ,  293,5 ,   5,17 ,  22,23 , {67,90,75},      146,2 ,   3345,68 ,      19,5 ,       4,0 ,     648,7 ,     655,5 ,     2,     0,     1,     6,     7 }, // Czech/Latin/Czech Republic
     {     29,     7,    58,    44,    46,    59,    37,    48,    45,    43,   101,    8220,    8221,    8216,    8217,       0,6 ,       0,6 ,     188,8 ,     188,8 ,    495,10 ,    505,23 ,     239,5 ,    244,10 ,   2241,28 ,   2269,51 ,   2320,14 ,   2334,35 ,   2269,51 ,   2320,14 ,       0,2 ,       0,2 ,    0,5 ,   5,17 ,  22,23 , {68,75,75},      148,3 ,   3413,42 ,      19,5 ,       4,0 ,     660,5 ,     665,7 ,     2,     0,     1,     6,     7 }, // Danish/Latin/Denmark
diff -Naur a/src/corelib/text/qstringiterator_p.h b/src/corelib/text/qstringiterator_p.h
--- a/src/corelib/text/qstringiterator_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/text/qstringiterator_p.h	2024-05-09 16:34:52.604649387 +0200
@@ -123,16 +123,20 @@
     {
         Q_ASSERT_X(hasNext(), Q_FUNC_INFO, "iterator hasn't a next item");
 
-        if (Q_UNLIKELY((pos++)->isHighSurrogate()))
+        if (Q_UNLIKELY((pos++)->isHighSurrogate())) {
+            Q_ASSERT(pos < e && pos->isLowSurrogate());
             ++pos;
+        }
     }
 
     inline uint peekNextUnchecked() const
     {
         Q_ASSERT_X(hasNext(), Q_FUNC_INFO, "iterator hasn't a next item");
 
-        if (Q_UNLIKELY(pos->isHighSurrogate()))
+        if (Q_UNLIKELY(pos->isHighSurrogate())) {
+            Q_ASSERT(pos + 1 < e && pos[1].isLowSurrogate());
             return QChar::surrogateToUcs4(pos[0], pos[1]);
+        }
 
         return pos->unicode();
     }
@@ -158,8 +162,10 @@
         Q_ASSERT_X(hasNext(), Q_FUNC_INFO, "iterator hasn't a next item");
 
         const QChar cur = *pos++;
-        if (Q_UNLIKELY(cur.isHighSurrogate()))
+        if (Q_UNLIKELY(cur.isHighSurrogate())) {
+            Q_ASSERT(pos < e && pos->isLowSurrogate());
             return QChar::surrogateToUcs4(cur, *pos++);
+        }
         return cur.unicode();
     }
 
@@ -199,16 +205,20 @@
     {
         Q_ASSERT_X(hasPrevious(), Q_FUNC_INFO, "iterator hasn't a previous item");
 
-        if (Q_UNLIKELY((--pos)->isLowSurrogate()))
+        if (Q_UNLIKELY((--pos)->isLowSurrogate())) {
+            Q_ASSERT(pos > i && pos[-1].isHighSurrogate());
             --pos;
+        }
     }
 
     inline uint peekPreviousUnchecked() const
     {
         Q_ASSERT_X(hasPrevious(), Q_FUNC_INFO, "iterator hasn't a previous item");
 
-        if (Q_UNLIKELY(pos[-1].isLowSurrogate()))
+        if (Q_UNLIKELY(pos[-1].isLowSurrogate())) {
+            Q_ASSERT(pos > i + 1 && pos[-2].isHighSurrogate());
             return QChar::surrogateToUcs4(pos[-2], pos[-1]);
+        }
         return pos[-1].unicode();
     }
 
@@ -233,8 +243,10 @@
         Q_ASSERT_X(hasPrevious(), Q_FUNC_INFO, "iterator hasn't a previous item");
 
         const QChar cur = *--pos;
-        if (Q_UNLIKELY(cur.isLowSurrogate()))
+        if (Q_UNLIKELY(cur.isLowSurrogate())) {
+            Q_ASSERT(pos > i && pos[-1].isHighSurrogate());
             return QChar::surrogateToUcs4(*--pos, cur);
+        }
         return cur.unicode();
     }
 
diff -Naur a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
--- a/src/corelib/thread/qfutex_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/thread/qfutex_p.h	2024-05-09 16:34:52.604649387 +0200
@@ -52,6 +52,7 @@
 //
 
 #include <qglobal.h>
+#include <QtCore/qtsan_impl.h>
 
 QT_BEGIN_NAMESPACE
 
@@ -106,16 +107,13 @@
     inline int _q_futex(int *addr, int op, int val, quintptr val2 = 0,
                         int *addr2 = nullptr, int val3 = 0) noexcept
     {
-        // A futex call ensures total ordering on the futex words
-        // (in either success or failure of the call). Instruct TSAN accordingly,
-        // as TSAN does not understand the futex(2) syscall.
-        _q_tsan_release(addr, addr2);
+        QtTsan::futexRelease(addr, addr2);
 
         // we use __NR_futex because some libcs (like Android's bionic) don't
         // provide SYS_futex etc.
         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
 
-        _q_tsan_acquire(addr, addr2);
+        QtTsan::futexAcquire(addr, addr2);
 
         return result;
     }
diff -Naur a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
--- a/src/corelib/thread/qmutex.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/thread/qmutex.cpp	2024-05-09 16:34:52.604649387 +0200
@@ -152,6 +152,7 @@
 
 /*!
     \enum QMutex::RecursionMode
+    \obsolete Use QRecursiveMutex to create a recursive mutex.
 
     \value Recursive  In this mode, a thread can lock the same mutex
                       multiple times and the mutex won't be unlocked
@@ -173,6 +174,7 @@
 
 /*!
     Constructs a new mutex. The mutex is created in an unlocked state.
+    \obsolete Use QRecursiveMutex to create a recursive mutex.
 
     If \a mode is QMutex::Recursive, a thread can lock the same mutex
     multiple times and the mutex won't be unlocked until a
@@ -197,7 +199,7 @@
 QMutex::~QMutex()
 {
     QMutexData *d = d_ptr.loadRelaxed();
-    if (isRecursive()) {
+    if (QBasicMutex::isRecursive()) {
         delete static_cast<QRecursiveMutexPrivate *>(d);
     } else if (d) {
 #ifndef QT_LINUX_FUTEX
diff -Naur a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
--- a/src/corelib/thread/qmutex.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/thread/qmutex.h	2024-05-09 16:34:52.607982742 +0200
@@ -42,6 +42,7 @@
 
 #include <QtCore/qglobal.h>
 #include <QtCore/qatomic.h>
+#include <QtCore/qtsan_impl.h>
 #include <new>
 
 #if __has_include(<chrono>)
@@ -77,19 +78,37 @@
 
     // BasicLockable concept
     inline void lock() QT_MUTEX_LOCK_NOEXCEPT {
+        QtTsan::mutexPreLock(this, 0u);
+
         if (!fastTryLock())
             lockInternal();
+
+        QtTsan::mutexPostLock(this, 0u, 0);
     }
 
     // BasicLockable concept
     inline void unlock() noexcept {
         Q_ASSERT(d_ptr.loadRelaxed()); //mutex must be locked
+
+        QtTsan::mutexPreUnlock(this, 0u);
+
         if (!fastTryUnlock())
             unlockInternal();
+
+        QtTsan::mutexPostUnlock(this, 0u);
     }
 
     bool tryLock() noexcept {
-        return fastTryLock();
+        unsigned tsanFlags = QtTsan::TryLock;
+        QtTsan::mutexPreLock(this, tsanFlags);
+
+        const bool success = fastTryLock();
+
+        if (!success)
+            tsanFlags |= QtTsan::TryLockFailed;
+        QtTsan::mutexPostLock(this, tsanFlags, 0);
+
+        return success;
     }
 
     // Lockable concept
@@ -134,8 +153,16 @@
 #else
     QMutex() { d_ptr.storeRelaxed(nullptr); }
 #endif
+#if QT_DEPRECATED_SINCE(5,15)
     enum RecursionMode { NonRecursive, Recursive };
+    QT_DEPRECATED_VERSION_X(5, 15, "Use QRecursiveMutex instead of a recursive QMutex")
     explicit QMutex(RecursionMode mode);
+
+    QT_DEPRECATED_VERSION_X(5, 15, "Use QRecursiveMutex instead of a recursive QMutex")
+    bool isRecursive() const noexcept
+    { return QBasicMutex::isRecursive(); }
+#endif
+
     ~QMutex();
 
     // BasicLockable concept
@@ -166,9 +193,6 @@
     }
 #endif
 
-    bool isRecursive() const noexcept
-    { return QBasicMutex::isRecursive(); }
-
 private:
     Q_DISABLE_COPY(QMutex)
     friend class QMutexLocker;
diff -Naur a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
--- a/src/corelib/thread/qthreadpool.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/thread/qthreadpool.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -602,8 +602,12 @@
         return false;
 
     QRunnable *runnable = QRunnable::create(std::move(functionToRun));
+    Q_ASSERT(runnable->ref == 0);
+    ++runnable->ref;
     if (d->tryStart(runnable))
         return true;
+    --runnable->ref;
+    Q_ASSERT(runnable->ref == 0);
     delete runnable;
     return false;
 }
diff -Naur a/src/corelib/thread/qtsan_impl.h b/src/corelib/thread/qtsan_impl.h
--- a/src/corelib/thread/qtsan_impl.h	1970-01-01 01:00:00.000000000 +0100
+++ b/src/corelib/thread/qtsan_impl.h	2024-05-09 16:34:52.607982742 +0200
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Intel Corporation.
+** Copyright (C) 2022 KlarĂ¤lvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTSAN_IMPL_H
+#define QTSAN_IMPL_H
+
+#include <QtCore/qglobal.h>
+
+#if (__has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)) && __has_include(<sanitizer/tsan_interface.h>)
+#  define QT_BUILDING_UNDER_TSAN
+#  include <sanitizer/tsan_interface.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+namespace QtTsan {
+#ifdef QT_BUILDING_UNDER_TSAN
+inline void futexAcquire(void *addr, void *addr2 = nullptr)
+{
+    // A futex call ensures total ordering on the futex words
+    // (in either success or failure of the call). Instruct TSAN accordingly,
+    // as TSAN does not understand the futex(2) syscall (or equivalent).
+    ::__tsan_acquire(addr);
+    if (addr2)
+        ::__tsan_acquire(addr2);
+}
+
+inline void futexRelease(void *addr, void *addr2 = nullptr)
+{
+    if (addr2)
+        ::__tsan_release(addr2);
+    ::__tsan_release(addr);
+}
+
+inline void mutexPreLock(void *addr, unsigned flags)
+{
+    ::__tsan_mutex_pre_lock(addr, flags);
+}
+
+inline void mutexPostLock(void *addr, unsigned flags, int recursion)
+{
+    ::__tsan_mutex_post_lock(addr, flags, recursion);
+}
+
+inline void mutexPreUnlock(void *addr, unsigned flags)
+{
+    ::__tsan_mutex_pre_unlock(addr, flags);
+}
+
+inline void mutexPostUnlock(void *addr, unsigned flags)
+{
+    ::__tsan_mutex_post_unlock(addr, flags);
+}
+
+enum : unsigned {
+    MutexWriteReentrant = ::__tsan_mutex_write_reentrant,
+    TryLock = ::__tsan_mutex_try_lock,
+    TryLockFailed = ::__tsan_mutex_try_lock_failed,
+};
+#else
+inline void futexAcquire(void *, void * = nullptr) {}
+inline void futexRelease(void *, void * = nullptr) {}
+
+enum : unsigned {
+    MutexWriteReentrant,
+    TryLock,
+    TryLockFailed,
+};
+inline void mutexPreLock(void *, unsigned) {}
+inline void mutexPostLock(void *, unsigned, int) {}
+inline void mutexPreUnlock(void *, unsigned) {}
+inline void mutexPostUnlock(void *, unsigned) {}
+#endif // QT_BUILDING_UNDER_TSAN
+} // namespace QtTsan
+
+QT_END_NAMESPACE
+
+#endif // QTSAN_IMPL_H
diff -Naur a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
--- a/src/corelib/thread/qwaitcondition_unix.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/thread/qwaitcondition_unix.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -213,7 +213,7 @@
 {
     if (! mutex)
         return false;
-    if (mutex->isRecursive()) {
+    if (static_cast<QBasicMutex *>(mutex)->isRecursive()) {
         qWarning("QWaitCondition: cannot wait on recursive mutexes");
         return false;
     }
diff -Naur a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp
--- a/src/corelib/time/qtimezone.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/corelib/time/qtimezone.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2013 John Layt <jlayt@kde.org>
+** Copyright (C) 2020 John Layt <jlayt@kde.org>
 ** Contact: https://www.qt.io/licensing/
 **
 ** This file is part of the QtCore module of the Qt Toolkit.
@@ -975,9 +975,15 @@
 }
 
 #ifndef QT_NO_DATASTREAM
+// Invalid, as an IANA ID: too long, starts with - and has other invalid characters in it
+static inline QString invalidId() { return QStringLiteral("-No Time Zone Specified!"); }
+
 QDataStream &operator<<(QDataStream &ds, const QTimeZone &tz)
 {
-    tz.d->serialize(ds);
+    if (tz.isValid())
+        tz.d->serialize(ds);
+    else
+        ds << invalidId();
     return ds;
 }
 
@@ -985,7 +991,9 @@
 {
     QString ianaId;
     ds >> ianaId;
-    if (ianaId == QLatin1String("OffsetFromUtc")) {
+    if (ianaId == invalidId()) {
+        tz = QTimeZone();
+    } else if (ianaId == QLatin1String("OffsetFromUtc")) {
         int utcOffset;
         QString name;
         QString abbreviation;
diff -Naur a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
--- a/src/dbus/qdbusintegrator.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/dbus/qdbusintegrator.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -1135,7 +1135,13 @@
         }
     }
 
-    qDeleteAll(pendingCalls);
+    for (auto it = pendingCalls.begin(); it != pendingCalls.end(); ++it) {
+        auto call = *it;
+        if (!call->ref.deref()) {
+            delete call;
+        }
+    }
+    pendingCalls.clear();
 
     // Disconnect all signals from signal hooks and from the object tree to
     // avoid QObject::destroyed being sent to dbus daemon thread which has
diff -Naur a/src/gui/configure.json b/src/gui/configure.json
--- a/src/gui/configure.json	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/configure.json	2024-05-09 16:34:52.607982742 +0200
@@ -834,7 +834,8 @@
                     "// embedded devices, are not intended to be used together with X. EGL support",
                     "// has to be disabled in plugins like xcb in this case since the native display,",
                     "// window and pixmap types will be different than what an X-based platform",
-                    "// plugin would expect."
+                    "// plugin would expect.",
+                    "#define USE_X11"
                 ],
                 "include": [ "EGL/egl.h", "X11/Xlib.h" ],
                 "main": [
diff -Naur a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
--- a/src/gui/image/qbmphandler.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/image/qbmphandler.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -150,16 +150,42 @@
     return s;
 }
 
-static int calc_shift(uint mask)
+static uint calc_shift(uint mask)
 {
-    int result = 0;
-    while (mask && !(mask & 1)) {
+    uint result = 0;
+    while ((mask >= 0x100) || (!(mask & 1) && mask)) {
         result++;
         mask >>= 1;
     }
     return result;
 }
 
+static uint calc_scale(uint low_mask)
+{
+    uint result = 8;
+    while (low_mask && result) {
+        result--;
+        low_mask >>= 1;
+    }
+    return result;
+}
+
+static inline uint apply_scale(uint value, uint scale)
+{
+    if (!(scale & 0x07)) // return immediately if scale == 8 or 0
+        return value;
+
+    uint filled = 8 - scale;
+    uint result = value << scale;
+
+    do {
+        result |= result >> filled;
+        filled <<= 1;
+    } while (filled < 8);
+
+    return result;
+}
+
 static bool read_dib_fileheader(QDataStream &s, BMP_FILEHDR &bf)
 {
     // read BMP file header
@@ -222,14 +248,14 @@
     uint green_mask = 0;
     uint blue_mask = 0;
     uint alpha_mask = 0;
-    int red_shift = 0;
-    int green_shift = 0;
-    int blue_shift = 0;
-    int alpha_shift = 0;
-    int red_scale = 0;
-    int green_scale = 0;
-    int blue_scale = 0;
-    int alpha_scale = 0;
+    uint red_shift = 0;
+    uint green_shift = 0;
+    uint blue_shift = 0;
+    uint alpha_shift = 0;
+    uint red_scale = 0;
+    uint green_scale = 0;
+    uint blue_scale = 0;
+    uint alpha_scale = 0;
 
     if (!d->isSequential())
         d->seek(startpos + BMP_FILEHDR_SIZE + bi.biSize); // goto start of colormap or masks
@@ -308,19 +334,19 @@
         red_shift = calc_shift(red_mask);
         if (((red_mask >> red_shift) + 1) == 0)
             return false;
-        red_scale = 256 / ((red_mask >> red_shift) + 1);
+        red_scale = calc_scale(red_mask >> red_shift);
         green_shift = calc_shift(green_mask);
         if (((green_mask >> green_shift) + 1) == 0)
             return false;
-        green_scale = 256 / ((green_mask >> green_shift) + 1);
+        green_scale = calc_scale(green_mask >> green_shift);
         blue_shift = calc_shift(blue_mask);
         if (((blue_mask >> blue_shift) + 1) == 0)
             return false;
-        blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
+        blue_scale = calc_scale(blue_mask >> blue_shift);
         alpha_shift = calc_shift(alpha_mask);
         if (((alpha_mask >> alpha_shift) + 1) == 0)
             return false;
-        alpha_scale = 256 / ((alpha_mask >> alpha_shift) + 1);
+        alpha_scale = calc_scale(alpha_mask >> alpha_shift);
     } else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
         blue_mask = 0x000000ff;
         green_mask = 0x0000ff00;
@@ -328,17 +354,15 @@
         blue_shift = 0;
         green_shift = 8;
         red_shift = 16;
-        blue_scale = green_scale = red_scale = 1;
+        blue_scale = green_scale = red_scale = 0;
     } else if (comp == BMP_RGB && nbits == 16) {
         blue_mask = 0x001f;
         green_mask = 0x03e0;
         red_mask = 0x7c00;
         blue_shift = 0;
-        green_shift = 2;
-        red_shift = 7;
-        red_scale = 1;
-        green_scale = 1;
-        blue_scale = 8;
+        green_shift = 5;
+        red_shift = 10;
+        blue_scale = green_scale = red_scale = 3;
     }
 
 #if 0
@@ -544,10 +568,10 @@
                     c |= *(uchar*)(b+2)<<16;
                 if (nbits > 24)
                     c |= *(uchar*)(b+3)<<24;
-                *p++ = qRgba(((c & red_mask) >> red_shift) * red_scale,
-                                        ((c & green_mask) >> green_shift) * green_scale,
-                                        ((c & blue_mask) >> blue_shift) * blue_scale,
-                                        transp ? ((c & alpha_mask) >> alpha_shift) * alpha_scale : 0xff);
+                *p++ = qRgba(apply_scale((c & red_mask) >> red_shift, red_scale),
+                             apply_scale((c & green_mask) >> green_shift, green_scale),
+                             apply_scale((c & blue_mask) >> blue_shift, blue_scale),
+                             transp ? apply_scale((c & alpha_mask) >> alpha_shift, alpha_scale) : 0xff);
                 b += nbits/8;
             }
         }
diff -Naur a/src/gui/image/qimage_neon.cpp b/src/gui/image/qimage_neon.cpp
--- a/src/gui/image/qimage_neon.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/image/qimage_neon.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -54,7 +54,7 @@
 
     // align dst on 128 bits
     const int offsetToAlignOn16Bytes = (reinterpret_cast<quintptr>(dst) >> 2) & 0x3;
-    for (int i = 0; i < offsetToAlignOn16Bytes; ++i) {
+    for (int i = 0; i < qMin(len, offsetToAlignOn16Bytes); ++i) {
         *dst++ = qRgb(src[0], src[1], src[2]);
         src += 3;
     }
diff -Naur a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
--- a/src/gui/image/qimagereader.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/image/qimagereader.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -515,9 +515,9 @@
 */
 QImageReaderPrivate::~QImageReaderPrivate()
 {
+    delete handler;
     if (deleteDevice)
         delete device;
-    delete handler;
 }
 
 /*!
@@ -774,12 +774,12 @@
 */
 void QImageReader::setDevice(QIODevice *device)
 {
+    delete d->handler;
+    d->handler = nullptr;
     if (d->device && d->deleteDevice)
         delete d->device;
     d->device = device;
     d->deleteDevice = false;
-    delete d->handler;
-    d->handler = nullptr;
     d->text.clear();
 }
 
diff -Naur a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp
--- a/src/gui/image/qimagewriter.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/image/qimagewriter.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -349,9 +349,9 @@
 */
 QImageWriter::~QImageWriter()
 {
+    delete d->handler;
     if (d->deleteDevice)
         delete d->device;
-    delete d->handler;
     delete d;
 }
 
@@ -396,13 +396,13 @@
 */
 void QImageWriter::setDevice(QIODevice *device)
 {
+    delete d->handler;
+    d->handler = nullptr;
     if (d->device && d->deleteDevice)
         delete d->device;
 
     d->device = device;
     d->deleteDevice = false;
-    delete d->handler;
-    d->handler = nullptr;
 }
 
 /*!
diff -Naur a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
--- a/src/gui/image/qpixmapcache.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/image/qpixmapcache.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -466,6 +466,7 @@
         killTimer(theid);
         theid = 0;
     }
+    cacheKeys.clear();
 }
 
 QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
diff -Naur a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
--- a/src/gui/itemmodels/qstandarditemmodel.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -3113,13 +3113,13 @@
 */
 QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const
 {
-    QMimeData *data = QAbstractItemModel::mimeData(indexes);
-    if(!data)
+    std::unique_ptr<QMimeData> data(QAbstractItemModel::mimeData(indexes));
+    if (!data)
         return nullptr;
 
     const QString format = qStandardItemModelDataListMimeType();
     if (!mimeTypes().contains(format))
-        return data;
+        return data.release();
     QByteArray encoded;
     QDataStream stream(&encoded, QIODevice::WriteOnly);
 
@@ -3172,7 +3172,7 @@
     }
 
     data->setData(format, encoded);
-    return data;
+    return data.release();
 }
 
 
diff -Naur a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
--- a/src/gui/kernel/qhighdpiscaling.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qhighdpiscaling.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -580,9 +580,8 @@
     else
         qNamedScreenScaleFactors()->insert(name, factor);
 
-    // hack to force re-evaluation of screen geometry
     if (screen->handle())
-        screen->d_func()->setPlatformScreen(screen->handle()); // updates geometries based on scale factor
+        screen->d_func()->updateLogicalDpi();
 }
 
 QPoint QHighDpiScaling::mapPositionToNative(const QPoint &pos, const QPlatformScreen *platformScreen)
diff -Naur a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
--- a/src/gui/kernel/qkeysequence.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qkeysequence.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -701,6 +701,10 @@
     { Qt::Key_TouchpadToggle,  QT_TRANSLATE_NOOP("QShortcut", "Touchpad Toggle") },
     { Qt::Key_TouchpadOn,  QT_TRANSLATE_NOOP("QShortcut", "Touchpad On") },
     { Qt::Key_TouchpadOff,  QT_TRANSLATE_NOOP("QShortcut", "Touchpad Off") },
+    { Qt::Key_Shift,  QT_TRANSLATE_NOOP("QShortcut", "Shift") },
+    { Qt::Key_Control,  QT_TRANSLATE_NOOP("QShortcut", "Control") },
+    { Qt::Key_Alt,  QT_TRANSLATE_NOOP("QShortcut", "Alt") },
+    { Qt::Key_Meta,  QT_TRANSLATE_NOOP("QShortcut", "Meta") },
 
 };
 static Q_CONSTEXPR int numKeyNames = sizeof keyname / sizeof *keyname;
diff -Naur a/src/gui/kernel/qplatformservices.cpp b/src/gui/kernel/qplatformservices.cpp
--- a/src/gui/kernel/qplatformservices.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qplatformservices.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -55,6 +55,19 @@
     \brief The QPlatformServices provides the backend for desktop-related functionality.
 */
 
+/*!
+    \enum QPlatformServices::Capability
+
+    Capabilities are used to determine a specific platform service's availability.
+
+    \value ColorPickingFromScreen The platform natively supports color picking from screen.
+    This capability indicates that the platform supports "opaque" color picking, where the
+    platform implements a complete user experience for color picking and outputs a color.
+    This is in contrast to the application implementing the color picking user experience
+    (taking care of showing a cross hair, instructing the platform integration to obtain
+    the color at a given pixel, etc.). The related service function is pickColor().
+ */
+
 QPlatformServices::QPlatformServices()
 { }
 
@@ -85,5 +98,16 @@
     return QByteArray("UNKNOWN");
 }
 
+QPlatformServiceColorPicker *QPlatformServices::colorPicker(QWindow *parent)
+{
+    Q_UNUSED(parent);
+    return nullptr;
+}
+
+bool QPlatformServices::hasCapability(Capability capability) const
+{
+    Q_UNUSED(capability)
+    return false;
+}
 
 QT_END_NAMESPACE
diff -Naur a/src/gui/kernel/qplatformservices.h b/src/gui/kernel/qplatformservices.h
--- a/src/gui/kernel/qplatformservices.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qplatformservices.h	2024-05-09 16:34:52.607982742 +0200
@@ -50,16 +50,32 @@
 //
 
 #include <QtGui/qtguiglobal.h>
+#include <QtCore/qobject.h>
 
 QT_BEGIN_NAMESPACE
 
 class QUrl;
+class QWindow;
+
+class Q_GUI_EXPORT QPlatformServiceColorPicker : public QObject
+{
+    Q_OBJECT
+public:
+    using QObject::QObject;
+    virtual void pickColor() = 0;
+Q_SIGNALS:
+    void colorPicked(const QColor &color);
+};
 
 class Q_GUI_EXPORT QPlatformServices
 {
 public:
     Q_DISABLE_COPY_MOVE(QPlatformServices)
 
+    enum Capability {
+        ColorPicking,
+    };
+
     QPlatformServices();
     virtual ~QPlatformServices() { }
 
@@ -67,6 +83,10 @@
     virtual bool openDocument(const QUrl &url);
 
     virtual QByteArray desktopEnvironment() const;
+
+    virtual bool hasCapability(Capability capability) const;
+
+    virtual QPlatformServiceColorPicker *colorPicker(QWindow *parent = nullptr);
 };
 
 QT_END_NAMESPACE
diff -Naur a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
--- a/src/gui/kernel/qplatformtheme.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qplatformtheme.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -163,6 +163,8 @@
 
     \value ShowShortcutsInContextMenus (bool) Whether to display shortcut key sequences in context menus.
 
+    \value ButtonPressKeys (QList<Qt::Key>) A list of keys that can be used to press buttons via keyboard input.
+
     \sa themeHint(), QStyle::pixelMetric()
 */
 
@@ -563,6 +565,8 @@
         }
     case MouseQuickSelectionThreshold:
         return QVariant(10);
+    case ButtonPressKeys:
+        return QVariant::fromValue(QList<Qt::Key>({ Qt::Key_Space, Qt::Key_Select }));
     }
     return QVariant();
 }
diff -Naur a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
--- a/src/gui/kernel/qplatformtheme.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qplatformtheme.h	2024-05-09 16:34:52.607982742 +0200
@@ -120,7 +120,8 @@
         TouchDoubleTapDistance,
         ShowShortcutsInContextMenus,
         IconFallbackSearchPaths,
-        MouseQuickSelectionThreshold
+        MouseQuickSelectionThreshold,
+        ButtonPressKeys
     };
 
     enum DialogType {
diff -Naur a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
--- a/src/gui/kernel/qscreen.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qscreen.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -77,6 +77,12 @@
     d->setPlatformScreen(screen);
 }
 
+void QScreenPrivate::updateLogicalDpi()
+{
+    logicalDpi = QPlatformScreen::overrideDpi(platformScreen->logicalDpi());
+    updateGeometriesWithSignals(); // updates geometries based on scale factor
+}
+
 void QScreenPrivate::updateGeometriesWithSignals()
 {
     const QRect oldGeometry = geometry;
diff -Naur a/src/gui/kernel/qscreen_p.h b/src/gui/kernel/qscreen_p.h
--- a/src/gui/kernel/qscreen_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qscreen_p.h	2024-05-09 16:34:52.607982742 +0200
@@ -70,6 +70,7 @@
         geometry = platformScreen->deviceIndependentGeometry();
         availableGeometry = QHighDpi::fromNative(platformScreen->availableGeometry(), QHighDpiScaling::factor(platformScreen), geometry.topLeft());
     }
+    void updateLogicalDpi();
 
     void updatePrimaryOrientation();
     void updateGeometriesWithSignals();
diff -Naur a/src/gui/kernel/qshapedpixmapdndwindow.cpp b/src/gui/kernel/qshapedpixmapdndwindow.cpp
--- a/src/gui/kernel/qshapedpixmapdndwindow.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qshapedpixmapdndwindow.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -56,7 +56,7 @@
     QSurfaceFormat format;
     format.setAlphaBufferSize(8);
     setFormat(format);
-    setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint
+    setFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint
              | Qt::WindowTransparentForInput | Qt::WindowDoesNotAcceptFocus);
 }
 
diff -Naur a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
--- a/src/gui/kernel/qwindow.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/kernel/qwindow.cpp	2024-05-09 16:34:52.607982742 +0200
@@ -644,7 +644,7 @@
     into an actual native surface. However, the window remains hidden until setVisible() is called.
 
     Note that it is not usually necessary to call this function directly, as it will be implicitly
-    called by show(), setVisible(), and other functions that require access to the platform
+    called by show(), setVisible(), winId(), and other functions that require access to the platform
     resources.
 
     Call destroy() to free the platform resources if necessary.
@@ -660,6 +660,9 @@
 /*!
     Returns the window's platform id.
 
+    \note This function will cause the platform window to be created if it is not already.
+    Returns 0, if the platform window creation failed.
+
     For platforms where this id might be useful, the value returned
     will uniquely represent the window inside the corresponding screen.
 
@@ -672,6 +675,9 @@
     if(!d->platformWindow)
         const_cast<QWindow *>(this)->create();
 
+    if (!d->platformWindow)
+        return 0;
+
     return d->platformWindow->winId();
 }
 
diff -Naur a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
--- a/src/gui/opengl/qopengltexture.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/opengl/qopengltexture.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -3725,6 +3725,12 @@
         return;
     }
 
+    QImage glImage = image.convertToFormat(QImage::Format_RGBA8888);
+    if (glImage.isNull()) {
+        qWarning("QOpenGLTexture::setData() failed to convert image");
+        return;
+    }
+
     if (context->isOpenGLES() && context->format().majorVersion() < 3)
         setFormat(QOpenGLTexture::RGBAFormat);
     else
@@ -3735,7 +3741,6 @@
     allocateStorage(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8);
 
     // Upload pixel data and generate mipmaps
-    QImage glImage = image.convertToFormat(QImage::Format_RGBA8888);
     QOpenGLPixelTransferOptions uploadOptions;
     uploadOptions.setAlignment(1);
     setData(0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, glImage.constBits(), &uploadOptions);
diff -Naur a/src/gui/painting/qcolortrclut_p.h b/src/gui/painting/qcolortrclut_p.h
--- a/src/gui/painting/qcolortrclut_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/painting/qcolortrclut_p.h	2024-05-09 16:34:52.611316097 +0200
@@ -118,6 +118,7 @@
         return QRgba64::fromRgba64(r, g, b, qAlpha(rgb32) * 257);
 #endif
     }
+    QRgba64 toLinear64(QRgba64) const = delete;
 
     QRgb toLinear(QRgb rgb32) const
     {
diff -Naur a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
--- a/src/gui/painting/qdrawhelper.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/painting/qdrawhelper.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -6091,7 +6091,7 @@
 static inline void rgbBlendPixel(QRgba64 &dst, int coverage, QRgba64 slinear, const QColorTrcLut *colorProfile)
 {
     // Do a gammacorrected RGB alphablend...
-    const QRgba64 dlinear = colorProfile ? colorProfile->toLinear64(dst) : dst;
+    const QRgba64 dlinear = colorProfile ? colorProfile->toLinear(dst) : dst;
 
     QRgba64 blend = rgbBlend(dlinear, slinear, coverage);
 
diff -Naur a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h
--- a/src/gui/painting/qfixed_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/painting/qfixed_p.h	2024-05-09 16:34:52.611316097 +0200
@@ -54,6 +54,7 @@
 #include <QtGui/private/qtguiglobal_p.h>
 #include "QtCore/qdebug.h"
 #include "QtCore/qpoint.h"
+#include <QtCore/private/qnumeric_p.h>
 #include "QtCore/qsize.h"
 
 QT_BEGIN_NAMESPACE
@@ -182,6 +183,14 @@
 Q_DECL_CONSTEXPR inline bool operator>(const QFixed &f, int i) { return f.value() > i * 64; }
 Q_DECL_CONSTEXPR inline bool operator>(int i, const QFixed &f) { return i * 64 > f.value(); }
 
+inline bool qAddOverflow(QFixed v1, QFixed v2, QFixed *r)
+{
+    int val;
+    bool result = add_overflow(v1.value(), v2.value(), &val);
+    r->setValue(val);
+    return result;
+}
+
 #ifndef QT_NO_DEBUG_STREAM
 inline QDebug &operator<<(QDebug &dbg, const QFixed &f)
 { return dbg << f.toReal(); }
diff -Naur a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
--- a/src/gui/painting/qpainterpath.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/painting/qpainterpath.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -1253,7 +1253,7 @@
 
         if (si.analysis.flags < QScriptAnalysis::TabOrObject) {
             QGlyphLayout glyphs = eng->shapedGlyphs(&si);
-            QFontEngine *fe = f.d->engineForScript(si.analysis.script);
+            QFontEngine *fe = eng->fontEngine(si);
             Q_ASSERT(fe);
             fe->addOutlineToPath(x, y, glyphs, this,
                                  si.analysis.bidiLevel % 2
diff -Naur a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
--- a/src/gui/painting/qpdf.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/painting/qpdf.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -2760,6 +2760,8 @@
         return gradientBrush(brush, matrix, gStateObject);
     }
 
+    matrix = brush.transform() * matrix;
+
     if ((!brush.isOpaque() && brush.style() < Qt::LinearGradientPattern) || opacity != 1.0)
         *gStateObject = addConstantAlphaObject(qRound(brush.color().alpha() * opacity),
                                                qRound(pen.color().alpha() * opacity));
diff -Naur a/src/gui/rhi/qshaderdescription_p_p.h b/src/gui/rhi/qshaderdescription_p_p.h
--- a/src/gui/rhi/qshaderdescription_p_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/rhi/qshaderdescription_p_p.h	2024-05-09 16:34:52.611316097 +0200
@@ -63,16 +63,16 @@
         localSize[0] = localSize[1] = localSize[2] = 0;
     }
 
-    QShaderDescriptionPrivate(const QShaderDescriptionPrivate *other)
+    QShaderDescriptionPrivate(const QShaderDescriptionPrivate &other)
         : ref(1),
-          inVars(other->inVars),
-          outVars(other->outVars),
-          uniformBlocks(other->uniformBlocks),
-          pushConstantBlocks(other->pushConstantBlocks),
-          storageBlocks(other->storageBlocks),
-          combinedImageSamplers(other->combinedImageSamplers),
-          storageImages(other->storageImages),
-          localSize(other->localSize)
+          inVars(other.inVars),
+          outVars(other.outVars),
+          uniformBlocks(other.uniformBlocks),
+          pushConstantBlocks(other.pushConstantBlocks),
+          storageBlocks(other.storageBlocks),
+          combinedImageSamplers(other.combinedImageSamplers),
+          storageImages(other.storageImages),
+          localSize(other.localSize)
     {
     }
 
diff -Naur a/src/gui/rhi/qshader_p_p.h b/src/gui/rhi/qshader_p_p.h
--- a/src/gui/rhi/qshader_p_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/rhi/qshader_p_p.h	2024-05-09 16:34:52.611316097 +0200
@@ -68,13 +68,13 @@
     {
     }
 
-    QShaderPrivate(const QShaderPrivate *other)
+    QShaderPrivate(const QShaderPrivate &other)
         : ref(1),
-          qsbVersion(other->qsbVersion),
-          stage(other->stage),
-          desc(other->desc),
-          shaders(other->shaders),
-          bindings(other->bindings)
+          qsbVersion(other.qsbVersion),
+          stage(other.stage),
+          desc(other.desc),
+          shaders(other.shaders),
+          bindings(other.bindings)
     {
     }
 
diff -Naur a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
--- a/src/gui/text/qfontdatabase.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/text/qfontdatabase.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -983,7 +983,7 @@
         if (style->key.stretch != 0 && request.stretch != 0
             && (request.styleName.isEmpty() || request.styleName != style->styleName)) {
             def.stretch = (request.stretch * 100 + style->key.stretch / 2) / style->key.stretch;
-        } else {
+        } else if (request.stretch == QFont::AnyStretch) {
             def.stretch = 100;
         }
 
diff -Naur a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
--- a/src/gui/text/qtextengine.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/text/qtextengine.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
 ** Contact: https://www.qt.io/licensing/
 **
 ** This file is part of the QtGui module of the Qt Toolkit.
diff -Naur a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
--- a/src/gui/text/qtextlayout.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/text/qtextlayout.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -1336,13 +1336,16 @@
     bool rightToLeft = d->isRightToLeft();
     if (itm >= 0) {
         const QScriptItem &si = d->layoutData->items.at(itm);
-        if (si.ascent >= 0)
-            base = si.ascent;
-        if (si.descent >= 0)
-            descent = si.descent;
+        // objects need some special treatment as they can have special alignment or be floating
+        if (si.analysis.flags != QScriptAnalysis::Object) {
+            if (si.ascent > 0)
+                base = si.ascent;
+            if (si.descent > 0)
+                descent = si.descent;
+        }
         rightToLeft = si.analysis.bidiLevel % 2;
     }
-    qreal y = position.y() + (sl.y + sl.base() + sl.descent - base - descent).toReal();
+    qreal y = position.y() + (sl.y + sl.base() - base).toReal();
     bool toggleAntialiasing = !(p->renderHints() & QPainter::Antialiasing)
                               && (p->transform().type() > QTransform::TxTranslate);
     if (toggleAntialiasing)
@@ -2163,11 +2166,14 @@
         eng->maxWidth = qMax(eng->maxWidth, line.textWidth);
     } else {
         eng->minWidth = qMax(eng->minWidth, lbh.minw);
-        eng->maxWidth += line.textWidth;
+        if (qAddOverflow(eng->maxWidth, line.textWidth, &eng->maxWidth))
+            eng->maxWidth = QFIXED_MAX;
     }
 
-    if (line.textWidth > 0 && item < eng->layoutData->items.size())
-        eng->maxWidth += lbh.spaceData.textWidth;
+    if (line.textWidth > 0 && item < eng->layoutData->items.size()) {
+        if (qAddOverflow(eng->maxWidth, lbh.spaceData.textWidth, &eng->maxWidth))
+            eng->maxWidth = QFIXED_MAX;
+    }
 
     line.textWidth += trailingSpace;
     if (lbh.spaceData.length) {
diff -Naur a/src/gui/util/qshadergenerator.cpp b/src/gui/util/qshadergenerator.cpp
--- a/src/gui/util/qshadergenerator.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/util/qshadergenerator.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -492,7 +492,7 @@
             int end = begin + 1;
             char endChar = line.at(end);
             const int size = line.size();
-            while (end < size && (std::isalnum(endChar) || endChar == '_')) {
+            while (end < size && (std::isalnum(uchar(endChar)) || endChar == '_')) {
                 ++end;
                 endChar = line.at(end);
             }
diff -Naur a/src/gui/util/qshaderlanguage.cpp b/src/gui/util/qshaderlanguage.cpp
--- a/src/gui/util/qshaderlanguage.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/gui/util/qshaderlanguage.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -52,3 +52,5 @@
 }
 
 QT_END_NAMESPACE
+
+#include "moc_qshaderlanguage_p.cpp"
diff -Naur a/src/network/access/http2/hpacktable.cpp b/src/network/access/http2/hpacktable.cpp
--- a/src/network/access/http2/hpacktable.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/access/http2/hpacktable.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -40,6 +40,7 @@
 #include "hpacktable_p.h"
 
 #include <QtCore/qdebug.h>
+#include <QtCore/private/qnumeric_p.h>
 
 #include <algorithm>
 #include <cstddef>
@@ -62,8 +63,10 @@
     // for counting the number of references to the name and value would have
     // 32 octets of overhead."
 
-    const unsigned sum = unsigned(name.size() + value.size());
-    if (std::numeric_limits<unsigned>::max() - 32 < sum)
+    size_t sum;
+    if (add_overflow(size_t(name.size()), size_t(value.size()), &sum))
+        return HeaderSize();
+    if (sum > (std::numeric_limits<unsigned>::max() - 32))
         return HeaderSize();
     return HeaderSize(true, quint32(sum + 32));
 }
diff -Naur a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
--- a/src/network/access/qhsts.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/access/qhsts.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -364,8 +364,8 @@
 bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
 {
     for (const auto &h : headers) {
-        // We use '==' since header name was already 'trimmed' for us:
-        if (h.first == "Strict-Transport-Security") {
+        // We compare directly because header name was already 'trimmed' for us:
+        if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
             header = h.second;
             // RFC6797, 8.1:
             //
diff -Naur a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp
--- a/src/network/access/qhttp2protocolhandler.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/access/qhttp2protocolhandler.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -46,10 +46,12 @@
 #include <private/qnoncontiguousbytedevice_p.h>
 
 #include <QtNetwork/qabstractsocket.h>
+
 #include <QtCore/qloggingcategory.h>
 #include <QtCore/qendian.h>
 #include <QtCore/qdebug.h>
 #include <QtCore/qlist.h>
+#include <QtCore/private/qnumeric_p.h>
 #include <QtCore/qurl.h>
 
 #include <qhttp2configuration.h>
@@ -124,8 +126,10 @@
     std::vector<uchar> hpackBlock;
 
     quint32 total = 0;
-    for (const auto &frame : frames)
-        total += frame.hpackBlockSize();
+    for (const auto &frame : frames) {
+        if (add_overflow(total, frame.hpackBlockSize(), &total))
+            return hpackBlock;
+    }
 
     if (!total)
         return hpackBlock;
diff -Naur a/src/network/access/qnetworkreplyfileimpl_p.h b/src/network/access/qnetworkreplyfileimpl_p.h
--- a/src/network/access/qnetworkreplyfileimpl_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/access/qnetworkreplyfileimpl_p.h	2024-05-09 16:34:52.611316097 +0200
@@ -37,8 +37,8 @@
 **
 ****************************************************************************/
 
-#ifndef QNETWORKREPLYFILEIMPL_H
-#define QNETWORKREPLYFILEIMPL_H
+#ifndef QNETWORKREPLYFILEIMPL_P_H
+#define QNETWORKREPLYFILEIMPL_P_H
 
 //
 //  W A R N I N G
@@ -99,4 +99,4 @@
 
 Q_DECLARE_METATYPE(QNetworkRequest::KnownHeaders)
 
-#endif // QNETWORKREPLYFILEIMPL_H
+#endif // QNETWORKREPLYFILEIMPL_P_H
diff -Naur a/src/network/configure.json b/src/network/configure.json
--- a/src/network/configure.json	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/configure.json	2024-05-09 16:34:52.611316097 +0200
@@ -53,7 +53,7 @@
             },
             "headers": "proxy.h",
             "sources": [
-                "-lproxy"
+                { "type": "pkgConfig", "args": "libproxy-1.0" }
             ]
         },
         "openssl_headers": {
diff -Naur a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
--- a/src/network/kernel/qdnslookup_unix.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/kernel/qdnslookup_unix.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -227,7 +227,6 @@
     // responseLength in case of error, we still can extract the
     // exact error code from the response.
     HEADER *header = (HEADER*)response;
-    const int answerCount = ntohs(header->ancount);
     switch (header->rcode) {
     case NOERROR:
         break;
@@ -260,18 +259,31 @@
         return;
     }
 
-    // Skip the query host, type (2 bytes) and class (2 bytes).
     char host[PACKETSZ], answer[PACKETSZ];
     unsigned char *p = response + sizeof(HEADER);
-    int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
-    if (status < 0) {
+    int status;
+
+    if (ntohs(header->qdcount) == 1) {
+        // Skip the query host, type (2 bytes) and class (2 bytes).
+        status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
+        if (status < 0) {
+            reply->error = QDnsLookup::InvalidReplyError;
+            reply->errorString = tr("Could not expand domain name");
+            return;
+        }
+        if ((p - response) + status + 4 >= responseLength)
+            header->qdcount = 0xffff;   // invalid reply below
+        else
+            p += status + 4;
+    }
+    if (ntohs(header->qdcount) > 1) {
         reply->error = QDnsLookup::InvalidReplyError;
-        reply->errorString = tr("Could not expand domain name");
+        reply->errorString = tr("Invalid reply received");
         return;
     }
-    p += status + 4;
 
     // Extract results.
+    const int answerCount = ntohs(header->ancount);
     int answerIndex = 0;
     while ((p < response + responseLength) && (answerIndex < answerCount)) {
         status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
@@ -283,6 +295,11 @@
         const QString name = QUrl::fromAce(host);
 
         p += status;
+
+        if ((p - response) + 10 > responseLength) {
+            // probably just a truncated reply, return what we have
+            return;
+        }
         const quint16 type = (p[0] << 8) | p[1];
         p += 2; // RR type
         p += 2; // RR class
@@ -290,6 +307,8 @@
         p += 4;
         const quint16 size = (p[0] << 8) | p[1];
         p += 2;
+        if ((p - response) + size > responseLength)
+            return;             // truncated
 
         if (type == QDnsLookup::A) {
             if (size != 4) {
diff -Naur a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
--- a/src/network/kernel/qhostinfo.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/kernel/qhostinfo.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -181,7 +181,6 @@
         // we didn't have a context object, or it's still alive
         if (!withContextObject || receiver)
             slotObj->call(const_cast<QObject*>(receiver.data()), args);
-        slotObj->destroyIfLastRef();
 
         deleteLater();
         return true;
@@ -801,6 +800,8 @@
 
     if (!QAbstractEventDispatcher::instance(QThread::currentThread())) {
         qWarning("QHostInfo::lookupHost() called with no event dispatcher");
+        if (slotObj)
+            slotObj->destroyIfLastRef();
         return -1;
     }
 
@@ -847,6 +848,8 @@
             QObject::connect(&runnable->resultEmitter, SIGNAL(resultsReady(QHostInfo)),
                                 receiver, member, Qt::QueuedConnection);
         manager->scheduleLookup(runnable);
+    } else if (slotObj) {
+        slotObj->destroyIfLastRef();
     }
     return id;
 }
diff -Naur a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
--- a/src/network/kernel/qhostinfo_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/kernel/qhostinfo_p.h	2024-05-09 16:34:52.611316097 +0200
@@ -90,6 +90,12 @@
             moveToThread(receiver->thread());
     }
 
+    ~QHostInfoResult()
+    {
+        if (slotObj)
+            slotObj->destroyIfLastRef();
+    }
+
     void postResultsReady(const QHostInfo &info);
 
 Q_SIGNALS:
@@ -103,6 +109,8 @@
         : receiver(other->receiver), slotObj(other->slotObj),
           withContextObject(other->withContextObject)
     {
+        if (slotObj)
+            slotObj->ref();
         // cleanup if the application terminates before results are delivered
         connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit,
                 this, &QObject::deleteLater);
diff -Naur a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
--- a/src/network/ssl/qsslconfiguration.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslconfiguration.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -929,7 +929,11 @@
     Retrieves the current set of Diffie-Hellman parameters.
 
     If no Diffie-Hellman parameters have been set, the QSslConfiguration object
-    defaults to using the 1024-bit MODP group from RFC 2409.
+    defaults to using the 2048-bit MODP group from RFC 3526.
+
+    \note The default parameters may change in future Qt versions.
+    Please check the documentation of the \e{exact Qt version} that you
+    are using in order to know what defaults that version uses.
  */
 QSslDiffieHellmanParameters QSslConfiguration::diffieHellmanParameters() const
 {
@@ -943,7 +947,11 @@
     a server to \a dhparams.
 
     If no Diffie-Hellman parameters have been set, the QSslConfiguration object
-    defaults to using the 1024-bit MODP group from RFC 2409.
+    defaults to using the 2048-bit MODP group from RFC 3526.
+
+    \note The default parameters may change in future Qt versions.
+    Please check the documentation of the \e{exact Qt version} that you
+    are using in order to know what defaults that version uses.
  */
 void QSslConfiguration::setDiffieHellmanParameters(const QSslDiffieHellmanParameters &dhparams)
 {
diff -Naur a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
--- a/src/network/ssl/qsslcontext_openssl.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslcontext_openssl.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -409,7 +409,7 @@
         break;
     case QSsl::DtlsV1_0OrLater:
         minVersion = DTLS1_VERSION;
-        maxVersion = DTLS_MAX_VERSION;
+        maxVersion = 0;
         break;
     case QSsl::DtlsV1_2:
         minVersion = DTLS1_2_VERSION;
@@ -417,7 +417,7 @@
         break;
     case QSsl::DtlsV1_2OrLater:
         minVersion = DTLS1_2_VERSION;
-        maxVersion = DTLS_MAX_VERSION;
+        maxVersion = 0;
         break;
     case QSsl::TlsV1_3OrLater:
 #ifdef TLS1_3_VERSION
diff -Naur a/src/network/ssl/qssldiffiehellmanparameters.cpp b/src/network/ssl/qssldiffiehellmanparameters.cpp
--- a/src/network/ssl/qssldiffiehellmanparameters.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qssldiffiehellmanparameters.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -68,17 +68,18 @@
 
 QT_BEGIN_NAMESPACE
 
-// The 1024-bit MODP group from RFC 2459 (Second Oakley Group)
+// The 2048-bit MODP group from RFC 3526
 Q_AUTOTEST_EXPORT const char *qssl_dhparams_default_base64 =
-    "MIGHAoGBAP//////////yQ/aoiFowjTExmKLgNwc0SkCTgiKZ8x0Agu+pjsTmyJR"
-    "Sgh5jjQE3e+VGbPNOkMbMCsKbfJfFDdP4TVtbVHCReSFtXZiXn7G9ExC6aY37WsL"
-    "/1y29Aa37e44a/taiZ+lrp8kEXxLH+ZJKGZR7OZTgf//////////AgEC";
+    "MIIBCAKCAQEA///////////JD9qiIWjCNMTGYouA3BzRKQJOCIpnzHQCC76mOxObIlFKCHmO"
+    "NATd75UZs806QxswKwpt8l8UN0/hNW1tUcJF5IW1dmJefsb0TELppjftawv/XLb0Brft7jhr"
+    "+1qJn6WunyQRfEsf5kkoZlHs5Fs9wgB8uKFjvwWY2kg2HFXTmmkWP6j9JM9fg2VdI9yjrZYc"
+    "YvNWIIVSu57VKQdwlpZtZww1Tkq8mATxdGwIyhghfDKQXkYuNs474553LBgOhgObJ4Oi7Aei"
+    "j7XFXfBvTFLJ3ivL9pVYFxg5lUl86pVq5RXSJhiY+gUQFXKOWoqsqmj//////////wIBAg==";
 
 /*!
     Returns the default QSslDiffieHellmanParameters used by QSslSocket.
 
-    This is currently the 1024-bit MODP group from RFC 2459, also
-    known as the Second Oakley Group.
+    This is currently the 2048-bit MODP group from RFC 3526.
 */
 QSslDiffieHellmanParameters QSslDiffieHellmanParameters::defaultParameters()
 {
diff -Naur a/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp b/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp
--- a/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qssldiffiehellmanparameters_openssl.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -59,57 +59,6 @@
 
 QT_BEGIN_NAMESPACE
 
-#ifdef OPENSSL_NO_DEPRECATED_3_0
-
-static int q_DH_check(DH *dh, int *status)
-{
-    // DH_check was first deprecated in OpenSSL 3.0.0, as low-level
-    // API; the EVP_PKEY family of functions was advised as an alternative.
-    // As of now EVP_PKEY_params_check ends up calling ... DH_check,
-    // which is good enough.
-
-    Q_ASSERT(dh);
-    Q_ASSERT(status);
-
-    EVP_PKEY *key = q_EVP_PKEY_new();
-    if (!key) {
-        qCWarning(lcSsl, "EVP_PKEY_new failed");
-        QSslSocketBackendPrivate::logAndClearErrorQueue();
-        return 0;
-    }
-    const auto keyDeleter = qScopeGuard([key](){
-        q_EVP_PKEY_free(key);
-    });
-    if (!q_EVP_PKEY_set1_DH(key, dh)) {
-        qCWarning(lcSsl, "EVP_PKEY_set1_DH failed");
-        QSslSocketBackendPrivate::logAndClearErrorQueue();
-        return 0;
-    }
-
-    EVP_PKEY_CTX *keyCtx = q_EVP_PKEY_CTX_new(key, nullptr);
-    if (!keyCtx) {
-        qCWarning(lcSsl, "EVP_PKEY_CTX_new failed");
-        QSslSocketBackendPrivate::logAndClearErrorQueue();
-        return 0;
-    }
-    const auto ctxDeleter = qScopeGuard([keyCtx]{
-        q_EVP_PKEY_CTX_free(keyCtx);
-    });
-
-    const int result = q_EVP_PKEY_param_check(keyCtx);
-    QSslSocketBackendPrivate::logAndClearErrorQueue();
-    // Note: unlike DH_check, we cannot obtain the 'status',
-    // if the 'result' is 0 (actually the result is 1 only
-    // if this 'status' was 0). We could probably check the
-    // errors from the error queue, but it's not needed anyway
-    // - see the 'isSafeDH' below, how it returns immediately
-    // on 0.
-    Q_UNUSED(status)
-
-    return result;
-}
-#endif // OPENSSL_NO_DEPRECATED_3_0
-
 static bool isSafeDH(DH *dh)
 {
     int status = 0;
@@ -206,6 +155,7 @@
         if (isSafeDH(dh)) {
             char *buf = nullptr;
             int len = q_i2d_DHparams(dh, reinterpret_cast<unsigned char **>(&buf));
+            auto freeBuf = qScopeGuard([&] { q_OPENSSL_free(buf); });
             if (len > 0)
                 derData = QByteArray(buf, len);
             else
diff -Naur a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
--- a/src/network/ssl/qsslsocket.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslsocket.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -2221,6 +2221,10 @@
     , flushTriggered(false)
 {
     QSslConfigurationPrivate::deepCopyDefaultConfiguration(&configuration);
+    // If the global configuration doesn't allow root certificates to be loaded
+    // on demand then we have to disable it for this socket as well.
+    if (!configuration.allowRootCertOnDemandLoading)
+        allowRootCertOnDemandLoading = false;
 }
 
 /*!
@@ -2470,6 +2474,7 @@
     ptr->sessionProtocol = global->sessionProtocol;
     ptr->ciphers = global->ciphers;
     ptr->caCertificates = global->caCertificates;
+    ptr->allowRootCertOnDemandLoading = global->allowRootCertOnDemandLoading;
     ptr->protocol = global->protocol;
     ptr->peerVerifyMode = global->peerVerifyMode;
     ptr->peerVerifyDepth = global->peerVerifyDepth;
diff -Naur a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
--- a/src/network/ssl/qsslsocket_mac.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslsocket_mac.cpp	2024-05-09 16:34:52.611316097 +0200
@@ -468,6 +468,7 @@
     if (context) {
         if (!shutdown) {
             SSLClose(context);
+            context.reset(nullptr);
             shutdown = true;
         }
     }
diff -Naur a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -499,9 +499,7 @@
 DEFINEFUNC(void, DH_free, DH *dh, dh, return, DUMMYARG)
 DEFINEFUNC3(DH *, d2i_DHparams, DH**a, a, const unsigned char **pp, pp, long length, length, return nullptr, return)
 DEFINEFUNC2(int, i2d_DHparams, DH *a, a, unsigned char **p, p, return -1, return)
-#ifndef OPENSSL_NO_DEPRECATED_3_0
 DEFINEFUNC2(int, DH_check, DH *dh, dh, int *codes, codes, return 0, return)
-#endif // OPENSSL_NO_DEPRECATED_3_0
 DEFINEFUNC3(BIGNUM *, BN_bin2bn, const unsigned char *s, s, int len, len, BIGNUM *ret, ret, return nullptr, return)
 
 #ifndef OPENSSL_NO_EC
@@ -1220,9 +1218,7 @@
     RESOLVEFUNC(DH_free)
     RESOLVEFUNC(d2i_DHparams)
     RESOLVEFUNC(i2d_DHparams)
-#ifndef OPENSSL_NO_DEPRECATED_3_0
     RESOLVEFUNC(DH_check)
-#endif // OPENSSL_NO_DEPRECATED_3_0
     RESOLVEFUNC(BN_bin2bn)
 
 #ifndef OPENSSL_NO_EC
diff -Naur a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -598,10 +598,7 @@
 void q_DH_free(DH *dh);
 DH *q_d2i_DHparams(DH **a, const unsigned char **pp, long length);
 int q_i2d_DHparams(DH *a, unsigned char **p);
-
-#ifndef OPENSSL_NO_DEPRECATED_3_0
 int q_DH_check(DH *dh, int *codes);
-#endif // OPENSSL_NO_DEPRECATED_3_0
 
 BIGNUM *q_BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
 #define q_SSL_CTX_set_tmp_dh(ctx, dh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_DH, 0, (char *)dh)
diff -Naur a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp
--- a/src/network/ssl/qsslsocket_schannel.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/network/ssl/qsslsocket_schannel.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -1880,6 +1880,28 @@
     if (configuration.peerVerifyDepth > 0 && DWORD(configuration.peerVerifyDepth) < verifyDepth)
         verifyDepth = DWORD(configuration.peerVerifyDepth);
 
+    const auto &caCertificates = q->sslConfiguration().caCertificates();
+
+    if (!rootCertOnDemandLoadingAllowed()
+            && !(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_PARTIAL_CHAIN)
+            && (q->peerVerifyMode() == QSslSocket::VerifyPeer
+                    || (isClient && q->peerVerifyMode() == QSslSocket::AutoVerifyPeer))) {
+        // When verifying a peer Windows "helpfully" builds a chain that
+        // may include roots from the system store. But we don't want that if
+        // the user has set their own CA certificates.
+        // Since Windows claims this is not a partial chain the root is included
+        // and we have to check that it is one of our configured CAs.
+        CERT_CHAIN_ELEMENT *element = chain->rgpElement[chain->cElement - 1];
+        QSslCertificate certificate = getCertificateFromChainElement(element);
+        if (!caCertificates.contains(certificate)) {
+            auto error = QSslError(QSslError::CertificateUntrusted, certificate);
+            sslErrors += error;
+            emit q->peerVerifyError(error);
+            if (q->state() != QAbstractSocket::ConnectedState)
+                return false;
+        }
+    }
+
     for (DWORD i = 0; i < verifyDepth; i++) {
         CERT_CHAIN_ELEMENT *element = chain->rgpElement[i];
         QSslCertificate certificate = getCertificateFromChainElement(element);
diff -Naur a/src/platformsupport/eglconvenience/qt_egl_p.h b/src/platformsupport/eglconvenience/qt_egl_p.h
--- a/src/platformsupport/eglconvenience/qt_egl_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/eglconvenience/qt_egl_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -61,7 +61,11 @@
 # if !defined(Q_OS_INTEGRITY)
 #  define WIN_INTERFACE_CUSTOM   // NV
 # endif // Q_OS_INTEGRITY
-#endif  // QT_EGL_NO_X11
+#else // QT_EGL_NO_X11
+// If one has an eglplatform.h with https://github.com/KhronosGroup/EGL-Registry/pull/130
+// that needs USE_X11 to be defined.
+# define USE_X11
+#endif
 
 #ifdef QT_EGL_WAYLAND
 # define WAYLAND // NV
diff -Naur a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -567,6 +567,8 @@
         fonts = FcFontList(nullptr, pattern, os);
         FcObjectSetDestroy(os);
         FcPatternDestroy(pattern);
+        if (!fonts)
+            return;
     }
 
     for (int i = 0; i < fonts->nfont; i++)
diff -Naur a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -1471,36 +1471,70 @@
     return fontEngine;
 }
 
-static QList<quint32> getTrueTypeFontOffsets(const uchar *fontData)
+static QList<quint32> getTrueTypeFontOffsets(const uchar *fontData, const uchar *fileEndSentinel)
 {
     QList<quint32> offsets;
-    const quint32 headerTag = *reinterpret_cast<const quint32 *>(fontData);
+    if (fileEndSentinel - fontData < 12) {
+        qCWarning(lcQpaFonts) << "Corrupted font data detected";
+        return offsets;
+    }
+
+    const quint32 headerTag = qFromUnaligned<quint32>(fontData);
     if (headerTag != MAKE_TAG('t', 't', 'c', 'f')) {
         if (headerTag != MAKE_TAG(0, 1, 0, 0)
             && headerTag != MAKE_TAG('O', 'T', 'T', 'O')
             && headerTag != MAKE_TAG('t', 'r', 'u', 'e')
-            && headerTag != MAKE_TAG('t', 'y', 'p', '1'))
+            && headerTag != MAKE_TAG('t', 'y', 'p', '1')) {
             return offsets;
+        }
         offsets << 0;
         return offsets;
     }
+
+    const quint32 maximumNumFonts = 0xffff;
     const quint32 numFonts = qFromBigEndian<quint32>(fontData + 8);
-    for (uint i = 0; i < numFonts; ++i) {
-        offsets << qFromBigEndian<quint32>(fontData + 12 + i * 4);
+    if (numFonts > maximumNumFonts) {
+        qCWarning(lcQpaFonts) << "Font collection of" << numFonts << "fonts is too large. Aborting.";
+        return offsets;
+    }
+
+    if (quintptr(fileEndSentinel - fontData) > 12 + (numFonts - 1) * 4) {
+        for (quint32 i = 0; i < numFonts; ++i)
+            offsets << qFromBigEndian<quint32>(fontData + 12 + i * 4);
+    } else {
+        qCWarning(lcQpaFonts) << "Corrupted font data detected";
     }
+
     return offsets;
 }
 
-static void getFontTable(const uchar *fileBegin, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
+static void getFontTable(const uchar *fileBegin, const uchar *fileEndSentinel, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
 {
-    const quint16 numTables = qFromBigEndian<quint16>(data + 4);
-    for (uint i = 0; i < numTables; ++i) {
-        const quint32 offset = 12 + 16 * i;
-        if (*reinterpret_cast<const quint32 *>(data + offset) == tag) {
-            *table = fileBegin + qFromBigEndian<quint32>(data + offset + 8);
-            *length = qFromBigEndian<quint32>(data + offset + 12);
-            return;
+    if (fileEndSentinel - data >= 6) {
+        const quint16 numTables = qFromBigEndian<quint16>(data + 4);
+        if (fileEndSentinel - data >= 28 + 16 * (numTables - 1)) {
+            for (quint32 i = 0; i < numTables; ++i) {
+                const quint32 offset = 12 + 16 * i;
+                if (qFromUnaligned<quint32>(data + offset) == tag) {
+                    const quint32 tableOffset = qFromBigEndian<quint32>(data + offset + 8);
+                    if (quintptr(fileEndSentinel - fileBegin) <= tableOffset) {
+                        qCWarning(lcQpaFonts) << "Corrupted font data detected";
+                        break;
+                    }
+                    *table = fileBegin + tableOffset;
+                    *length = qFromBigEndian<quint32>(data + offset + 12);
+                    if (quintptr(fileEndSentinel - *table) < *length) {
+                        qCWarning(lcQpaFonts) << "Corrupted font data detected";
+                        break;
+                    }
+                    return;
+                }
+            }
+        } else {
+            qCWarning(lcQpaFonts) << "Corrupted font data detected";
         }
+    } else {
+        qCWarning(lcQpaFonts) << "Corrupted font data detected";
     }
     *table = 0;
     *length = 0;
@@ -1513,8 +1547,9 @@
                                      QVector<QFontValues> *values)
 {
     const uchar *data = reinterpret_cast<const uchar *>(fontData.constData());
+    const uchar *dataEndSentinel = data + fontData.size();
 
-    QList<quint32> offsets = getTrueTypeFontOffsets(data);
+    QList<quint32> offsets = getTrueTypeFontOffsets(data, dataEndSentinel);
     if (offsets.isEmpty())
         return;
 
@@ -1522,7 +1557,7 @@
         const uchar *font = data + offsets.at(i);
         const uchar *table;
         quint32 length;
-        getFontTable(data, font, MAKE_TAG('n', 'a', 'm', 'e'), &table, &length);
+        getFontTable(data, dataEndSentinel, font, MAKE_TAG('n', 'a', 'm', 'e'), &table, &length);
         if (!table)
             continue;
         QFontNames names = qt_getCanonicalFontNames(table, length);
@@ -1532,7 +1567,7 @@
         families->append(std::move(names));
 
         if (values || signatures)
-            getFontTable(data, font, MAKE_TAG('O', 'S', '/', '2'), &table, &length);
+            getFontTable(data, dataEndSentinel, font, MAKE_TAG('O', 'S', '/', '2'), &table, &length);
 
         if (values) {
             QFontValues fontValues;
diff -Naur a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
--- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -95,6 +95,7 @@
         Xkb2Qt<XKB_KEY_Clear,                   Qt::Key_Delete>,
         Xkb2Qt<XKB_KEY_Pause,                   Qt::Key_Pause>,
         Xkb2Qt<XKB_KEY_Print,                   Qt::Key_Print>,
+        Xkb2Qt<XKB_KEY_Sys_Req,                 Qt::Key_SysReq>,
         Xkb2Qt<0x1005FF60,                      Qt::Key_SysReq>,         // hardcoded Sun SysReq
         Xkb2Qt<0x1007ff00,                      Qt::Key_SysReq>,         // hardcoded X386 SysReq
 
@@ -273,10 +274,14 @@
         Xkb2Qt<XKB_KEY_dead_small_schwa,        Qt::Key_Dead_Small_Schwa>,
         Xkb2Qt<XKB_KEY_dead_capital_schwa,      Qt::Key_Dead_Capital_Schwa>,
         Xkb2Qt<XKB_KEY_dead_greek,              Qt::Key_Dead_Greek>,
+/* The following four XKB_KEY_dead keys got removed in libxkbcommon 1.6.0
+   The define check is kind of version check here. */
+#ifdef XKB_KEY_dead_lowline
         Xkb2Qt<XKB_KEY_dead_lowline,            Qt::Key_Dead_Lowline>,
         Xkb2Qt<XKB_KEY_dead_aboveverticalline,  Qt::Key_Dead_Aboveverticalline>,
         Xkb2Qt<XKB_KEY_dead_belowverticalline,  Qt::Key_Dead_Belowverticalline>,
         Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
+#endif
 
         // Special keys from X.org - This include multimedia keys,
         // wireless/bluetooth/uwb keys, special launcher keys, etc.
@@ -754,6 +759,8 @@
 {
     xkb_layout_index_t layout;
     xkb_keysym_t sym = XKB_KEY_NoSymbol;
+    if (!state)
+        return sym;
     xkb_keymap *keymap = xkb_state_get_keymap(state);
     const xkb_layout_index_t layoutCount = xkb_keymap_num_layouts_for_key(keymap, keycode);
     const xkb_layout_index_t currentLayout = xkb_state_key_get_layout(state, keycode);
diff -Naur a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -194,6 +194,9 @@
                 "      <arg direction=\"out\" type=\"(so)\"/>\n"
                 "      <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName.Out0\"/>\n"
                 "    </method>\n"
+                "    <method name=\"GetAccessibleId\">\n"
+                "      <arg direction=\"out\" type=\"s\"/>\n"
+                "    </method>\n"
                 "  </interface>\n"
                 );
 
@@ -913,8 +916,17 @@
     }
     case QAccessible::NameChanged: {
         if (sendObject || sendObject_property_change || sendObject_property_change_accessible_name) {
-            QString path = pathForInterface(event->accessibleInterface());
-            QVariantList args = packDBusSignalArguments(QLatin1String("accessible-name"), 0, 0, variantForPath(path));
+            QAccessibleInterface *iface = event->accessibleInterface();
+            if (!iface) {
+                qCDebug(lcAccessibilityAtspi,
+                        "NameChanged event from invalid accessible.");
+                return;
+            }
+
+            QString path = pathForInterface(iface);
+            QVariantList args = packDBusSignalArguments(
+                QLatin1String("accessible-name"), 0, 0,
+                QVariant::fromValue(QDBusVariant(iface->text(QAccessible::Name))));
             sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
                            QLatin1String("PropertyChange"), args);
         }
@@ -922,8 +934,17 @@
     }
     case QAccessible::DescriptionChanged: {
         if (sendObject || sendObject_property_change || sendObject_property_change_accessible_description) {
-            QString path = pathForInterface(event->accessibleInterface());
-            QVariantList args = packDBusSignalArguments(QLatin1String("accessible-description"), 0, 0, variantForPath(path));
+            QAccessibleInterface *iface = event->accessibleInterface();
+            if (!iface) {
+                qCDebug(lcAccessibilityAtspi,
+                        "DescriptionChanged event from invalid accessible.");
+                return;
+            }
+
+            QString path = pathForInterface(iface);
+            QVariantList args = packDBusSignalArguments(
+                QLatin1String("accessible-description"), 0, 0,
+                QVariant::fromValue(QDBusVariant(iface->text(QAccessible::Description))));
             sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
                            QLatin1String("PropertyChange"), args);
         }
@@ -1038,7 +1059,9 @@
                 // Combo Box with AT-SPI likes to be special
                 // It requires a name-change to update caches and then selection-changed
                 QString path = pathForInterface(iface);
-                QVariantList args1 = packDBusSignalArguments(QLatin1String("accessible-name"), 0, 0, variantForPath(path));
+                QVariantList args1 = packDBusSignalArguments(
+                    QLatin1String("accessible-name"), 0, 0,
+                    QVariant::fromValue(QDBusVariant(iface->text(QAccessible::Name))));
                 sendDBusSignal(path, QLatin1String(ATSPI_DBUS_INTERFACE_EVENT_OBJECT),
                                QLatin1String("PropertyChange"), args1);
                 QVariantList args2 = packDBusSignalArguments(QString(), 0, 0, QVariant::fromValue(QDBusVariant(QVariant(0))));
@@ -1358,6 +1381,26 @@
     delete registry;
 }
 
+namespace {
+QString accessibleIdForAccessible(QAccessibleInterface *accessible)
+{
+    QString result;
+    while (accessible) {
+        if (!result.isEmpty())
+            result.prepend(QLatin1Char('.'));
+        if (auto obj = accessible->object()) {
+            const QString name = obj->objectName();
+            if (!name.isEmpty())
+                result.prepend(name);
+            else
+                result.prepend(QString::fromUtf8(obj->metaObject()->className()));
+        }
+        accessible = accessible->parent();
+    }
+    return result;
+}
+} // namespace
+
 // Accessible
 bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QString &function, const QDBusMessage &message, const QDBusConnection &connection)
 {
@@ -1441,6 +1484,9 @@
             children << ref;
         }
         connection.send(message.createReply(QVariant::fromValue(children)));
+    } else if (function == QLatin1String("GetAccessibleId")) {
+        sendReply(connection, message,
+                  QVariant::fromValue(QDBusVariant(accessibleIdForAccessible(interface))));
     } else {
         qCDebug(lcAccessibilityAtspi) << "WARNING: AtSpiAdaptor::accessibleInterface does not implement " << function << message.path();
         return false;
@@ -1560,11 +1606,12 @@
 // Component
 static QAccessibleInterface * getWindow(QAccessibleInterface * interface)
 {
-    if (interface->role() == QAccessible::Window)
+    if (interface->role() == QAccessible::Dialog || interface->role() == QAccessible::Window)
         return interface;
 
     QAccessibleInterface * parent = interface->parent();
-    while (parent && parent->role() != QAccessible::Window)
+    while (parent && parent->role() != QAccessible::Dialog
+            && parent->role() != QAccessible::Window)
         parent = parent->parent();
 
     return parent;
@@ -1582,7 +1629,7 @@
         wr = window->rect();
 
         cr.setX(cr.x() - wr.x());
-        cr.setY(cr.x() - wr.y());
+        cr.setY(cr.y() - wr.y());
     }
     return cr;
 }
@@ -1836,7 +1883,7 @@
         uint coordType = message.arguments().at(2).toUInt();
         if (coordType == ATSPI_COORD_TYPE_WINDOW) {
             QWindow *win = interface->window();
-            point -= QPoint(win->x(), win->y());
+            point += QPoint(win->x(), win->y());
         }
         int offset = interface->textInterface()->offsetAtPoint(point);
         sendReply(connection, message, offset);
diff -Naur a/src/platformsupport/linuxaccessibility/bridge.cpp b/src/platformsupport/linuxaccessibility/bridge.cpp
--- a/src/platformsupport/linuxaccessibility/bridge.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/linuxaccessibility/bridge.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -229,7 +229,11 @@
     //: Role of an accessible object
     { QAccessible::ButtonDropDown, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button with drop down") },
     //: Role of an accessible object
+#if ATSPI_ROLE_COUNT > 130
+    { QAccessible::ButtonMenu, ATSPI_ROLE_PUSH_BUTTON_MENU, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button menu") },
+#else
     { QAccessible::ButtonMenu, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button menu") },
+#endif
     //: Role of an accessible object - a button that expands a grid.
     { QAccessible::ButtonDropGrid, ATSPI_ROLE_PUSH_BUTTON, QT_TRANSLATE_NOOP("QSpiAccessibleBridge", "button with drop down grid") },
     //: Role of an accessible object - blank space between other objects.
diff -Naur a/src/platformsupport/linuxaccessibility/dbusconnection.cpp b/src/platformsupport/linuxaccessibility/dbusconnection.cpp
--- a/src/platformsupport/linuxaccessibility/dbusconnection.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/linuxaccessibility/dbusconnection.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -69,6 +69,21 @@
 DBusConnection::DBusConnection(QObject *parent)
     : QObject(parent), m_a11yConnection(QString()), m_enabled(false)
 {
+    // If the bus is explicitly set via env var it overrides everything else.
+    QByteArray addressEnv = qgetenv("AT_SPI_BUS_ADDRESS");
+    if (!addressEnv.isEmpty()) {
+        // Only connect on next loop run, connections to our enabled signal are
+        // only established after the ctor returns.
+        QMetaObject::invokeMethod(
+                this,
+                [this, addressEnv] {
+                    m_enabled = true;
+                    connectA11yBus(QString::fromLocal8Bit(addressEnv));
+                },
+                Qt::QueuedConnection);
+        return;
+    }
+
     // Start monitoring if "org.a11y.Bus" is registered as DBus service.
     QDBusConnection c = QDBusConnection::sessionBus();
     if (!c.isConnected()) {
diff -Naur a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp
--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -51,6 +51,9 @@
 #include <QtCore/QStandardPaths>
 #include <QtCore/QUrl>
 
+#include <QtGui/QGuiApplication>
+#include <QtGui/QWindow>
+
 #if QT_CONFIG(dbus)
 // These QtCore includes are needed for xdg-desktop-portal support
 #include <QtCore/private/qcore_unix_p.h>
@@ -58,6 +61,8 @@
 #include <QtCore/QFileInfo>
 #include <QtCore/QUrlQuery>
 
+#include <QtGui/QColor>
+
 #include <QtDBus/QDBusConnection>
 #include <QtDBus/QDBusMessage>
 #include <QtDBus/QDBusPendingCall>
@@ -205,8 +210,7 @@
     // handle_token (s) -  A string that will be used as the last element of the @handle.
     // writable (b) - Whether to allow the chosen application to write to the file.
 
-#ifdef O_PATH
-    const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH);
+    const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_RDONLY);
     if (fd != -1) {
         QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"),
                                                               QLatin1String("/org/freedesktop/portal/desktop"),
@@ -216,16 +220,13 @@
         QDBusUnixFileDescriptor descriptor;
         descriptor.giveFileDescriptor(fd);
 
-        const QVariantMap options = {{QLatin1String("writable"), true}};
+        const QVariantMap options = {};
 
         // FIXME parent_window_id
         message << QString() << QVariant::fromValue(descriptor) << options;
 
         return QDBusConnection::sessionBus().call(message);
     }
-#else
-    Q_UNUSED(url)
-#endif
 
     return QDBusMessage::createError(QDBusError::InternalError, qt_error_string());
 }
@@ -298,8 +299,135 @@
 
     return QDBusConnection::sessionBus().call(message);
 }
+
+namespace {
+struct XDGDesktopColor
+{
+    double r = 0;
+    double g = 0;
+    double b = 0;
+
+    QColor toQColor() const
+    {
+        constexpr auto rgbMax = 255;
+        return { static_cast<int>(r * rgbMax), static_cast<int>(g * rgbMax),
+                 static_cast<int>(b * rgbMax) };
+    }
+};
+
+const QDBusArgument &operator>>(const QDBusArgument &argument, XDGDesktopColor &myStruct)
+{
+    argument.beginStructure();
+    argument >> myStruct.r >> myStruct.g >> myStruct.b;
+    argument.endStructure();
+    return argument;
+}
+
+class XdgDesktopPortalColorPicker : public QPlatformServiceColorPicker
+{
+    Q_OBJECT
+public:
+    XdgDesktopPortalColorPicker(const QString &parentWindowId, QWindow *parent)
+        : QPlatformServiceColorPicker(parent), m_parentWindowId(parentWindowId)
+    {
+    }
+
+    void pickColor() override
+    {
+        // DBus signature:
+        // PickColor (IN   s      parent_window,
+        //            IN   a{sv}  options
+        //            OUT  o      handle)
+        // Options:
+        // handle_token (s) -  A string that will be used as the last element of the @handle.
+
+        QDBusMessage message = QDBusMessage::createMethodCall(
+                QStringLiteral("org.freedesktop.portal.Desktop"), QStringLiteral("/org/freedesktop/portal/desktop"),
+                QStringLiteral("org.freedesktop.portal.Screenshot"), QStringLiteral("PickColor"));
+        message << m_parentWindowId << QVariantMap();
+
+        QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message);
+        auto watcher = new QDBusPendingCallWatcher(pendingCall, this);
+        connect(watcher, &QDBusPendingCallWatcher::finished, this,
+                [this](QDBusPendingCallWatcher *watcher) {
+                    watcher->deleteLater();
+                    QDBusPendingReply<QDBusObjectPath> reply = *watcher;
+                    if (reply.isError()) {
+                        qWarning("DBus call to pick color failed: %s",
+                                 qPrintable(reply.error().message()));
+                        Q_EMIT colorPicked({});
+                    } else {
+                        QDBusConnection::sessionBus().connect(
+                                QStringLiteral("org.freedesktop.portal.Desktop"), reply.value().path(),
+                                QStringLiteral("org.freedesktop.portal.Request"), QStringLiteral("Response"), this,
+                                // clang-format off
+                                SLOT(gotColorResponse(uint,QVariantMap))
+                                // clang-format on
+                        );
+                    }
+                });
+    }
+
+private Q_SLOTS:
+    void gotColorResponse(uint result, const QVariantMap &map)
+    {
+        if (result != 0)
+            return;
+        XDGDesktopColor color{};
+        map.value(QStringLiteral("color")).value<QDBusArgument>() >> color;
+        Q_EMIT colorPicked(color.toQColor());
+        deleteLater();
+    }
+
+private:
+    const QString m_parentWindowId;
+};
+} // namespace
+
 #endif // QT_CONFIG(dbus)
 
+QGenericUnixServices::QGenericUnixServices()
+{
+#if QT_CONFIG(dbus)
+    if (qEnvironmentVariableIntValue("QT_NO_XDG_DESKTOP_PORTAL") > 0) {
+        return;
+    }
+    QDBusMessage message = QDBusMessage::createMethodCall(
+            QStringLiteral("org.freedesktop.portal.Desktop"), QStringLiteral("/org/freedesktop/portal/desktop"),
+            QStringLiteral("org.freedesktop.DBus.Properties"), QStringLiteral("Get"));
+    message << QStringLiteral("org.freedesktop.portal.Screenshot")
+            << QStringLiteral("version");
+
+    QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message);
+    auto watcher = new QDBusPendingCallWatcher(pendingCall);
+    QObject::connect(watcher, &QDBusPendingCallWatcher::finished, watcher,
+                     [this](QDBusPendingCallWatcher *watcher) {
+                         watcher->deleteLater();
+                         QDBusPendingReply<QVariant> reply = *watcher;
+                         if (!reply.isError() && reply.value().toUInt() >= 2)
+                             m_hasScreenshotPortalWithColorPicking = true;
+                     });
+
+#endif
+}
+
+QPlatformServiceColorPicker *QGenericUnixServices::colorPicker(QWindow *parent)
+{
+#if QT_CONFIG(dbus)
+    // Make double sure that we are in a wayland environment. In particular check
+    // WAYLAND_DISPLAY so also XWayland apps benefit from portal-based color picking.
+    // Outside wayland we'll rather rely on other means than the XDG desktop portal.
+    if (!qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY")
+        || QGuiApplication::platformName().startsWith(QLatin1String("wayland"))) {
+        return new XdgDesktopPortalColorPicker(portalWindowIdentifier(parent), parent);
+    }
+    return nullptr;
+#else
+    Q_UNUSED(parent);
+    return nullptr;
+#endif
+}
+
 QByteArray QGenericUnixServices::desktopEnvironment() const
 {
     static const QByteArray result = detectDesktopEnvironment();
@@ -354,6 +482,8 @@
 }
 
 #else
+QGenericUnixServices::QGenericUnixServices() = default;
+
 QByteArray QGenericUnixServices::desktopEnvironment() const
 {
     return QByteArrayLiteral("UNKNOWN");
@@ -373,6 +503,30 @@
     return false;
 }
 
+QPlatformServiceColorPicker *QGenericUnixServices::colorPicker(QWindow *parent)
+{
+    Q_UNUSED(parent);
+    return nullptr;
+}
+
 #endif // QT_NO_MULTIPROCESS
 
+QString QGenericUnixServices::portalWindowIdentifier(QWindow *window)
+{
+    if (QGuiApplication::platformName() == QLatin1String("xcb"))
+        return QStringLiteral("x11:") + QString::number(window->winId(), 16);
+    return QString();
+}
+
+bool QGenericUnixServices::hasCapability(Capability capability) const
+{
+    switch (capability) {
+    case Capability::ColorPicking:
+        return m_hasScreenshotPortalWithColorPicking;
+    }
+    return false;
+}
+
 QT_END_NAMESPACE
+
+#include "qgenericunixservices.moc"
diff -Naur a/src/platformsupport/services/genericunix/qgenericunixservices_p.h b/src/platformsupport/services/genericunix/qgenericunixservices_p.h
--- a/src/platformsupport/services/genericunix/qgenericunixservices_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/services/genericunix/qgenericunixservices_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -59,16 +59,21 @@
 class QGenericUnixServices : public QPlatformServices
 {
 public:
-    QGenericUnixServices() {}
+    QGenericUnixServices();
 
     QByteArray desktopEnvironment() const override;
 
+    bool hasCapability(Capability capability) const override;
     bool openUrl(const QUrl &url) override;
     bool openDocument(const QUrl &url) override;
+    QPlatformServiceColorPicker *colorPicker(QWindow *parent = nullptr) override;
+
+    virtual QString portalWindowIdentifier(QWindow *window);
 
 private:
     QString m_webBrowser;
     QString m_documentLauncher;
+    bool m_hasScreenshotPortalWithColorPicking = false;
 };
 
 QT_END_NAMESPACE
diff -Naur a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection.cpp b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection.cpp
--- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -69,6 +69,7 @@
 */
 QDBusMenuConnection::QDBusMenuConnection(QObject *parent, const QString &serviceName)
     : QObject(parent)
+    , m_serviceName(serviceName)
     , m_connection(serviceName.isNull() ? QDBusConnection::sessionBus()
                                         : QDBusConnection::connectToBus(QDBusConnection::SessionBus, serviceName))
     , m_dbusWatcher(new QDBusServiceWatcher(StatusNotifierWatcherService, m_connection, QDBusServiceWatcher::WatchForRegistration, this))
@@ -83,6 +84,12 @@
 #endif
 }
 
+QDBusMenuConnection::~QDBusMenuConnection()
+{
+  if (!m_serviceName.isEmpty() && m_connection.isConnected())
+      QDBusConnection::disconnectFromBus(m_serviceName);
+}
+
 void QDBusMenuConnection::dbusError(const QDBusError &error)
 {
     qWarning() << "QDBusTrayIcon encountered a D-Bus error:" << error;
@@ -105,13 +112,7 @@
 
 bool QDBusMenuConnection::registerTrayIcon(QDBusTrayIcon *item)
 {
-    bool success = connection().registerService(item->instanceId());
-    if (!success) {
-        qWarning() << "failed to register service" << item->instanceId();
-        return false;
-    }
-
-    success = connection().registerObject(StatusNotifierItemPath, item);
+    bool success = connection().registerObject(StatusNotifierItemPath, item);
     if (!success) {
         unregisterTrayIcon(item);
         qWarning() << "failed to register" << item->instanceId() << StatusNotifierItemPath;
@@ -126,21 +127,18 @@
 
 bool QDBusMenuConnection::registerTrayIconWithWatcher(QDBusTrayIcon *item)
 {
+    Q_UNUSED(item);
     QDBusMessage registerMethod = QDBusMessage::createMethodCall(
                 StatusNotifierWatcherService, StatusNotifierWatcherPath, StatusNotifierWatcherService,
                 QLatin1String("RegisterStatusNotifierItem"));
-    registerMethod.setArguments(QVariantList() << item->instanceId());
+    registerMethod.setArguments(QVariantList() << m_connection.baseService());
     return m_connection.callWithCallback(registerMethod, this, SIGNAL(trayIconRegistered()), SLOT(dbusError(QDBusError)));
 }
 
-bool QDBusMenuConnection::unregisterTrayIcon(QDBusTrayIcon *item)
+void QDBusMenuConnection::unregisterTrayIcon(QDBusTrayIcon *item)
 {
     unregisterTrayIconMenu(item);
     connection().unregisterObject(StatusNotifierItemPath);
-    bool success = connection().unregisterService(item->instanceId());
-    if (!success)
-        qWarning() << "failed to unregister service" << item->instanceId();
-    return success;
 }
 #endif // QT_NO_SYSTEMTRAYICON
 
diff -Naur a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h
--- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuconnection_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -70,6 +70,7 @@
 
 public:
     QDBusMenuConnection(QObject *parent = nullptr, const QString &serviceName = QString());
+    ~QDBusMenuConnection();
     QDBusConnection connection() const { return m_connection; }
     QDBusServiceWatcher *dbusWatcher() const { return m_dbusWatcher; }
     bool isStatusNotifierHostRegistered() const { return m_statusNotifierHostRegistered; }
@@ -78,7 +79,7 @@
     void unregisterTrayIconMenu(QDBusTrayIcon *item);
     bool registerTrayIcon(QDBusTrayIcon *item);
     bool registerTrayIconWithWatcher(QDBusTrayIcon *item);
-    bool unregisterTrayIcon(QDBusTrayIcon *item);
+    void unregisterTrayIcon(QDBusTrayIcon *item);
 #endif // QT_NO_SYSTEMTRAYICON
 
 Q_SIGNALS:
@@ -90,6 +91,7 @@
     void dbusError(const QDBusError &error);
 
 private:
+    QString m_serviceName;
     QDBusConnection m_connection;
     QDBusServiceWatcher *m_dbusWatcher;
     bool m_statusNotifierHostRegistered;
diff -Naur a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -755,6 +755,9 @@
         return QVariant(QChar(0x2022));
     case QPlatformTheme::UiEffects:
         return QVariant(int(HoverEffect));
+    case QPlatformTheme::ButtonPressKeys:
+        return QVariant::fromValue(
+                QList<Qt::Key>({ Qt::Key_Space, Qt::Key_Return, Qt::Key_Enter, Qt::Key_Select }));
     default:
         break;
     }
diff -Naur a/src/platformsupport/windowsuiautomation/qwindowsuiawrapper.cpp b/src/platformsupport/windowsuiautomation/qwindowsuiawrapper.cpp
--- a/src/platformsupport/windowsuiautomation/qwindowsuiawrapper.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/windowsuiautomation/qwindowsuiawrapper.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -53,7 +53,6 @@
         m_pUiaHostProviderFromHwnd = reinterpret_cast<PtrUiaHostProviderFromHwnd>(uiaLib.resolve("UiaHostProviderFromHwnd"));
         m_pUiaRaiseAutomationPropertyChangedEvent = reinterpret_cast<PtrUiaRaiseAutomationPropertyChangedEvent>(uiaLib.resolve("UiaRaiseAutomationPropertyChangedEvent"));
         m_pUiaRaiseAutomationEvent = reinterpret_cast<PtrUiaRaiseAutomationEvent>(uiaLib.resolve("UiaRaiseAutomationEvent"));
-        m_pUiaRaiseNotificationEvent = reinterpret_cast<PtrUiaRaiseNotificationEvent>(uiaLib.resolve("UiaRaiseNotificationEvent"));
         m_pUiaClientsAreListening = reinterpret_cast<PtrUiaClientsAreListening>(uiaLib.resolve("UiaClientsAreListening"));
     }
 }
@@ -69,7 +68,7 @@
     return &wrapper;
 }
 
-// True if most symbols resolved (UiaRaiseNotificationEvent is optional).
+// True if all symbols resolved.
 BOOL QWindowsUiaWrapper::ready()
 {
     return m_pUiaReturnRawElementProvider
@@ -114,12 +113,5 @@
     return m_pUiaRaiseAutomationEvent(pProvider, id);
 }
 
-HRESULT QWindowsUiaWrapper::raiseNotificationEvent(IRawElementProviderSimple *provider, NotificationKind notificationKind, NotificationProcessing notificationProcessing, BSTR displayString, BSTR activityId)
-{
-    if (!m_pUiaRaiseNotificationEvent)
-        return UIA_E_NOTSUPPORTED;
-    return m_pUiaRaiseNotificationEvent(provider, notificationKind, notificationProcessing, displayString, activityId);
-}
-
 QT_END_NAMESPACE
 
diff -Naur a/src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h b/src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h
--- a/src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/windowsuiautomation/qwindowsuiawrapper_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -80,20 +80,17 @@
     HRESULT hostProviderFromHwnd(HWND hwnd, IRawElementProviderSimple **ppProvider);
     HRESULT raiseAutomationPropertyChangedEvent(IRawElementProviderSimple *pProvider, PROPERTYID id, VARIANT oldValue, VARIANT newValue);
     HRESULT raiseAutomationEvent(IRawElementProviderSimple *pProvider, EVENTID id);
-    HRESULT raiseNotificationEvent(IRawElementProviderSimple *provider, NotificationKind notificationKind, NotificationProcessing notificationProcessing, BSTR displayString, BSTR activityId);
 
 private:
     typedef LRESULT (WINAPI *PtrUiaReturnRawElementProvider)(HWND, WPARAM, LPARAM, IRawElementProviderSimple *);
     typedef HRESULT (WINAPI *PtrUiaHostProviderFromHwnd)(HWND, IRawElementProviderSimple **);
     typedef HRESULT (WINAPI *PtrUiaRaiseAutomationPropertyChangedEvent)(IRawElementProviderSimple *, PROPERTYID, VARIANT, VARIANT);
     typedef HRESULT (WINAPI *PtrUiaRaiseAutomationEvent)(IRawElementProviderSimple *, EVENTID);
-    typedef HRESULT (WINAPI *PtrUiaRaiseNotificationEvent)(IRawElementProviderSimple *, NotificationKind, NotificationProcessing, BSTR, BSTR);
     typedef BOOL (WINAPI *PtrUiaClientsAreListening)();
     PtrUiaReturnRawElementProvider             m_pUiaReturnRawElementProvider = nullptr;
     PtrUiaHostProviderFromHwnd                 m_pUiaHostProviderFromHwnd = nullptr;
     PtrUiaRaiseAutomationPropertyChangedEvent  m_pUiaRaiseAutomationPropertyChangedEvent = nullptr;
     PtrUiaRaiseAutomationEvent                 m_pUiaRaiseAutomationEvent = nullptr;
-    PtrUiaRaiseNotificationEvent               m_pUiaRaiseNotificationEvent = nullptr;
     PtrUiaClientsAreListening                  m_pUiaClientsAreListening = nullptr;
 };
 
diff -Naur a/src/platformsupport/windowsuiautomation/uiatypes_p.h b/src/platformsupport/windowsuiautomation/uiatypes_p.h
--- a/src/platformsupport/windowsuiautomation/uiatypes_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/platformsupport/windowsuiautomation/uiatypes_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -162,22 +162,6 @@
     ExpandCollapseState_LeafNode          = 3
 };
 
-enum NotificationKind {
-    NotificationKind_ItemAdded       = 0,
-    NotificationKind_ItemRemoved     = 1,
-    NotificationKind_ActionCompleted = 2,
-    NotificationKind_ActionAborted   = 3,
-    NotificationKind_Other           = 4
-};
-
-enum NotificationProcessing {
-    NotificationProcessing_ImportantAll          = 0,
-    NotificationProcessing_ImportantMostRecent   = 1,
-    NotificationProcessing_All                   = 2,
-    NotificationProcessing_MostRecent            = 3,
-    NotificationProcessing_CurrentThenMostRecent = 4
-};
-
 struct UiaRect {
     double left;
     double top;
diff -Naur a/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml b/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml
--- a/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforminputcontexts/ibus/interfaces/org.freedesktop.IBus.InputContext.xml	2024-05-09 16:34:52.614649453 +0200
@@ -14,6 +14,12 @@
       <arg name="w" direction="in" type="i"/>
       <arg name="h" direction="in" type="i"/>
     </method>
+    <method name='SetCursorLocationRelative'>
+      <arg name="x" direction="in" type="i"/>
+      <arg name="y" direction="in" type="i"/>
+      <arg name="w" direction="in" type="i"/>
+      <arg name="h" direction="in" type="i"/>
+    </method>
     <method name="FocusIn"/>
     <method name="FocusOut"/>
     <method name="Reset"/>
diff -Naur a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h
--- a/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforminputcontexts/ibus/qibusinputcontextproxy.h	2024-05-09 16:34:52.614649453 +0200
@@ -112,6 +112,13 @@
         return asyncCallWithArgumentList(QLatin1String("SetCursorLocation"), argumentList);
     }
 
+    inline QDBusPendingReply<> SetCursorLocationRelative(int x, int y, int w, int h)
+    {
+        QList<QVariant> argumentList;
+        argumentList << QVariant::fromValue(x) << QVariant::fromValue(y) << QVariant::fromValue(w) << QVariant::fromValue(h);
+        return asyncCallWithArgumentList(QLatin1String("SetCursorLocationRelative"), argumentList);
+    }
+
     inline QDBusPendingReply<> SetEngine(const QString &name)
     {
         QList<QVariant> argumentList;
diff -Naur a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmseventreader.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -179,7 +179,7 @@
 
     m_device = device;
 
-    qCDebug(qLcEglfsKmsDebug, "Initalizing event reader for device %p fd %d",
+    qCDebug(qLcEglfsKmsDebug, "Initializing event reader for device %p fd %d",
             m_device, m_device->fd());
 
     m_thread = new QEglFSKmsEventReaderThread(m_device->fd());
diff -Naur a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -122,11 +122,13 @@
 #endif
     m_services.reset(new QPlatformServices);
 
-    QWindowSystemInterface::handleScreenAdded(new QOffscreenScreen);
+    m_screen = new QOffscreenScreen;
+    QWindowSystemInterface::handleScreenAdded(m_screen);
 }
 
 QOffscreenIntegration::~QOffscreenIntegration()
 {
+    QWindowSystemInterface::handleScreenRemoved(m_screen);
 }
 
 void QOffscreenIntegration::initialize()
diff -Naur a/src/plugins/platforms/offscreen/qoffscreenintegration.h b/src/plugins/platforms/offscreen/qoffscreenintegration.h
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.h	2024-05-09 16:34:52.614649453 +0200
@@ -84,6 +84,7 @@
 #endif
     QScopedPointer<QPlatformInputContext> m_inputContext;
     QScopedPointer<QPlatformServices> m_services;
+    QPlatformScreen *m_screen;
     mutable QScopedPointer<QPlatformNativeInterface> m_nativeInterface;
 };
 
diff -Naur a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -169,27 +169,11 @@
         }
         if (event->value().type() == QVariant::String) {
             if (QWindowsUiaMainProvider *provider = providerForAccessible(accessible)) {
-
-                // Tries to notify the change using UiaRaiseNotificationEvent(), which is only available on
-                // Windows 10 version 1709 or newer. Otherwise uses UiaRaiseAutomationPropertyChangedEvent().
-
-                BSTR displayString = bStrFromQString(event->value().toString());
-                BSTR activityId = bStrFromQString(QString());
-
-                HRESULT hr = QWindowsUiaWrapper::instance()->raiseNotificationEvent(provider, NotificationKind_Other,
-                                                                                    NotificationProcessing_ImportantMostRecent,
-                                                                                    displayString, activityId);
-
-                ::SysFreeString(displayString);
-                ::SysFreeString(activityId);
-
-                if (hr == static_cast<HRESULT>(UIA_E_NOTSUPPORTED)) {
-                    VARIANT oldVal, newVal;
-                    clearVariant(&oldVal);
-                    setVariantString(event->value().toString(), &newVal);
-                    QWindowsUiaWrapper::instance()->raiseAutomationPropertyChangedEvent(provider, UIA_ValueValuePropertyId, oldVal, newVal);
-                    ::SysFreeString(newVal.bstrVal);
-                }
+                // Notifies changes in string values.
+                VARIANT oldVal, newVal;
+                clearVariant(&oldVal);
+                setVariantString(event->value().toString(), &newVal);
+                QWindowsUiaWrapper::instance()->raiseAutomationPropertyChangedEvent(provider, UIA_ValueValuePropertyId, oldVal, newVal);
             }
         } else if (QAccessibleValueInterface *valueInterface = accessible->valueInterface()) {
             if (QWindowsUiaMainProvider *provider = providerForAccessible(accessible)) {
diff -Naur a/src/plugins/platforms/xcb/qxcbatom.cpp b/src/plugins/platforms/xcb/qxcbatom.cpp
--- a/src/plugins/platforms/xcb/qxcbatom.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbatom.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -90,6 +90,8 @@
 
     "_QT_CLOSE_CONNECTION\0"
 
+    "_QT_GET_TIMESTAMP\0"
+
     "_MOTIF_WM_HINTS\0"
 
     "DTWM_IS_RUNNING\0"
diff -Naur a/src/plugins/platforms/xcb/qxcbatom.h b/src/plugins/platforms/xcb/qxcbatom.h
--- a/src/plugins/platforms/xcb/qxcbatom.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbatom.h	2024-05-09 16:34:52.614649453 +0200
@@ -91,6 +91,8 @@
         // Qt/XCB specific
         _QT_CLOSE_CONNECTION,
 
+        _QT_GET_TIMESTAMP,
+
         _MOTIF_WM_HINTS,
 
         DTWM_IS_RUNNING,
diff -Naur a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -706,6 +706,8 @@
             QXcbVirtualDesktop *virtualDesktop = virtualDesktopForRootWindow(propertyNotify->window);
             if (virtualDesktop)
                 virtualDesktop->updateWorkArea();
+        } else if (propertyNotify->atom == atom(QXcbAtom::_NET_SUPPORTED)) {
+            m_wmSupport->updateNetWMAtoms();
         } else {
             HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
         }
@@ -802,8 +804,8 @@
 {
     // send a dummy event to myself to get the timestamp from X server.
     xcb_window_t window = rootWindow();
-    xcb_atom_t dummyAtom = atom(QXcbAtom::CLIP_TEMPORARY);
-    xcb_change_property(xcb_connection(), XCB_PROP_MODE_APPEND, window, dummyAtom,
+    xcb_atom_t dummyAtom = atom(QXcbAtom::_QT_GET_TIMESTAMP);
+    xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, window, dummyAtom,
                         XCB_ATOM_INTEGER, 32, 0, nullptr);
 
     connection()->flush();
@@ -835,8 +837,6 @@
     xcb_timestamp_t timestamp = pn->time;
     free(event);
 
-    xcb_delete_property(xcb_connection(), window, dummyAtom);
-
     return timestamp;
 }
 
diff -Naur a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -1255,16 +1255,14 @@
             if (Q_LIKELY(useValuators)) {
                 const qreal value = scaleOneValuator(normalizedValue, physicalScreenArea.x(), physicalScreenArea.width());
                 global.setX(value);
-                // mapFromGlobal is ok for nested/embedded windows, but works only with whole-number QPoint;
-                // so map it first, then add back the sub-pixel position
-                local.setX(window->mapFromGlobal(QPoint(int(value), 0)).x() + (value - int(value)));
+                local.setX(xcbWindow->mapFromGlobal(QPoint(int(value), 0)).x() + (value - int(value)));
             }
             break;
         case QXcbAtom::AbsY:
             if (Q_LIKELY(useValuators)) {
                 qreal value = scaleOneValuator(normalizedValue, physicalScreenArea.y(), physicalScreenArea.height());
                 global.setY(value);
-                local.setY(window->mapFromGlobal(QPoint(0, int(value))).y() + (value - int(value)));
+                local.setY(xcbWindow->mapFromGlobal(QPoint(0, int(value))).y() + (value - int(value)));
             }
             break;
         case QXcbAtom::AbsPressure:
diff -Naur a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -300,7 +300,7 @@
 #endif // !QT_NO_CURSOR
 
 QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen)
-    : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false)
+    : QXcbObject(conn), m_screen(screen), m_gtkCursorThemeInitialized(false), m_callbackForPropertyRegistered(false)
 {
 #if QT_CONFIG(cursor)
     // see NUM_BITMAPS in libXcursor/src/xcursorint.h
@@ -343,7 +343,7 @@
 {
     xcb_connection_t *conn = xcb_connection();
 
-    if (m_gtkCursorThemeInitialized) {
+    if (m_callbackForPropertyRegistered) {
         m_screen->xSettings()->removeCallbackForHandle(this);
     }
 
@@ -562,8 +562,10 @@
     xcb_cursor_t cursor = XCB_NONE;
 
 #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
-    if (m_screen->xSettings()->initialized())
+    if (m_screen->xSettings()->initialized()) {
         m_screen->xSettings()->registerCallbackForProperty("Gtk/CursorThemeName",cursorThemePropertyChanged,this);
+        m_callbackForPropertyRegistered = true;
+    }
 
     // Try Xcursor first
     if (cshape >= 0 && cshape <= Qt::LastCursor) {
diff -Naur a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
--- a/src/plugins/platforms/xcb/qxcbcursor.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbcursor.h	2024-05-09 16:34:52.614649453 +0200
@@ -122,6 +122,7 @@
                                            void *handle);
 #endif
     bool m_gtkCursorThemeInitialized;
+    bool m_callbackForPropertyRegistered;
 };
 
 QT_END_NAMESPACE
diff -Naur a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -274,8 +274,7 @@
 #ifndef QT_NO_OPENGL
 QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
 {
-    QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
-    QXcbGlIntegration *glIntegration = screen->connection()->glIntegration();
+    QXcbGlIntegration *glIntegration = defaultConnection()->glIntegration();
     if (!glIntegration) {
         qWarning("QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled");
         return nullptr;
diff -Naur a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -299,11 +299,6 @@
         return;
     }
 
-    QPlatformWindow::setGeometry(rect);
-
-    if (platformScreen != currentScreen)
-        QWindowSystemInterface::handleWindowScreenChanged(window(), platformScreen->QPlatformScreen::screen());
-
     const QSize minimumSize = windowMinimumSize();
     if (rect.width() > 0 || rect.height() > 0) {
         rect.setWidth(qBound(1, rect.width(), XCOORD_MAX));
@@ -315,6 +310,11 @@
         rect.setHeight(QHighDpi::toNativePixels(int(defaultWindowHeight), platformScreen->QPlatformScreen::screen()));
     }
 
+    QPlatformWindow::setGeometry(rect);
+
+    if (platformScreen != currentScreen)
+        QWindowSystemInterface::handleWindowScreenChanged(window(), platformScreen->QPlatformScreen::screen());
+
     xcb_window_t xcb_parent_id = platformScreen->root();
     if (parent()) {
         xcb_parent_id = static_cast<QXcbWindow *>(parent())->xcb_window();
@@ -1345,9 +1345,10 @@
 
     if (!icon_data.isEmpty()) {
         // Ignore icon exceeding maximum xcb request length
-        if (size_t(icon_data.size()) > xcb_get_maximum_request_length(xcb_connection())) {
-            qWarning("Ignoring window icon: Size %d exceeds maximum xcb request length %u.",
-                     icon_data.size(), xcb_get_maximum_request_length(xcb_connection()));
+        if (quint64(icon_data.size()) > quint64(xcb_get_maximum_request_length(xcb_connection()))) {
+            qWarning() << "Ignoring window icon" << icon_data.size()
+                       << "exceeds maximum xcb request length"
+                       << xcb_get_maximum_request_length(xcb_connection());
             return;
         }
         xcb_change_property(xcb_connection(),
@@ -1418,7 +1419,8 @@
                                           qMin(XCOORD_MAX, maximumSize.height()));
 
     if (sizeIncrement.width() > 0 || sizeIncrement.height() > 0) {
-        xcb_icccm_size_hints_set_base_size(&hints, baseSize.width(), baseSize.height());
+        if (!baseSize.isNull() && baseSize.isValid())
+            xcb_icccm_size_hints_set_base_size(&hints, baseSize.width(), baseSize.height());
         xcb_icccm_size_hints_set_resize_inc(&hints, sizeIncrement.width(), sizeIncrement.height());
     }
 
diff -Naur a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -102,15 +102,12 @@
 class QXdgDesktopPortalFileDialogPrivate
 {
 public:
-    QXdgDesktopPortalFileDialogPrivate(QPlatformFileDialogHelper *nativeFileDialog)
+    QXdgDesktopPortalFileDialogPrivate(QPlatformFileDialogHelper *nativeFileDialog, uint fileChooserPortalVersion)
         : nativeFileDialog(nativeFileDialog)
+        , fileChooserPortalVersion(fileChooserPortalVersion)
     { }
 
-    WId winId = 0;
-    bool directoryMode = false;
-    bool modal = false;
-    bool multipleFiles = false;
-    bool saveFile = false;
+    QEventLoop loop;
     QString acceptLabel;
     QString directory;
     QString title;
@@ -122,11 +119,16 @@
     QString selectedNameFilter;
     QStringList selectedFiles;
     std::unique_ptr<QPlatformFileDialogHelper> nativeFileDialog;
+    uint fileChooserPortalVersion = 0;
+    bool failedToOpen = false;
+    bool directoryMode = false;
+    bool multipleFiles = false;
+    bool saveFile = false;
 };
 
-QXdgDesktopPortalFileDialog::QXdgDesktopPortalFileDialog(QPlatformFileDialogHelper *nativeFileDialog)
+QXdgDesktopPortalFileDialog::QXdgDesktopPortalFileDialog(QPlatformFileDialogHelper *nativeFileDialog, uint fileChooserPortalVersion)
     : QPlatformFileDialogHelper()
-    , d_ptr(new QXdgDesktopPortalFileDialogPrivate(nativeFileDialog))
+    , d_ptr(new QXdgDesktopPortalFileDialogPrivate(nativeFileDialog, fileChooserPortalVersion))
 {
     Q_D(QXdgDesktopPortalFileDialog);
 
@@ -134,6 +136,9 @@
         connect(d->nativeFileDialog.get(), SIGNAL(accept()), this, SIGNAL(accept()));
         connect(d->nativeFileDialog.get(), SIGNAL(reject()), this, SIGNAL(reject()));
     }
+
+    d->loop.connect(this, SIGNAL(accept()), SLOT(quit()));
+    d->loop.connect(this, SIGNAL(reject()), SLOT(quit()));
 }
 
 QXdgDesktopPortalFileDialog::~QXdgDesktopPortalFileDialog()
@@ -177,7 +182,7 @@
     setDirectory(options()->initialDirectory());
 }
 
-void QXdgDesktopPortalFileDialog::openPortal()
+void QXdgDesktopPortalFileDialog::openPortal(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent)
 {
     Q_D(QXdgDesktopPortalFileDialog);
 
@@ -185,13 +190,13 @@
                                                           QLatin1String("/org/freedesktop/portal/desktop"),
                                                           QLatin1String("org.freedesktop.portal.FileChooser"),
                                                           d->saveFile ? QLatin1String("SaveFile") : QLatin1String("OpenFile"));
-    QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId, 16);
+    QString parentWindowId = QLatin1String("x11:") + QString::number(parent ? parent->winId() : 0, 16);
 
     QVariantMap options;
     if (!d->acceptLabel.isEmpty())
         options.insert(QLatin1String("accept_label"), d->acceptLabel);
 
-    options.insert(QLatin1String("modal"), d->modal);
+    options.insert(QLatin1String("modal"), windowModality != Qt::NonModal);
     options.insert(QLatin1String("multiple"), d->multipleFiles);
     options.insert(QLatin1String("directory"), d->directoryMode);
 
@@ -233,6 +238,9 @@
             filter.name = mimeType.comment();
             filter.filterConditions = filterConditions;
 
+            if (filter.name.isEmpty())
+                filter.name = mimeTypefilter;
+
             filterList << filter;
 
             if (!d->selectedMimeTypeFilter.isEmpty() && d->selectedMimeTypeFilter == mimeTypefilter)
@@ -290,10 +298,18 @@
 
     QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message);
     QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall);
-    connect(watcher, &QDBusPendingCallWatcher::finished, this, [this] (QDBusPendingCallWatcher *watcher) {
+    connect(watcher, &QDBusPendingCallWatcher::finished, this, [=] (QDBusPendingCallWatcher *watcher) {
         QDBusPendingReply<QDBusObjectPath> reply = *watcher;
-        if (reply.isError()) {
-            Q_EMIT reject();
+        // Any error means the dialog is not shown and we need to fallback
+        d->failedToOpen = reply.isError();
+        if (d->failedToOpen) {
+            if (d->nativeFileDialog) {
+                d->nativeFileDialog->show(windowFlags, windowModality, parent);
+                if (d->loop.isRunning())
+                    d->nativeFileDialog->exec();
+            } else {
+                Q_EMIT reject();
+            }
         } else {
             QDBusConnection::sessionBus().connect(nullptr,
                                                   reply.value().path(),
@@ -327,7 +343,7 @@
 {
     Q_D(const QXdgDesktopPortalFileDialog);
 
-    if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly))
+    if (d->nativeFileDialog && useNativeFileDialog())
         return d->nativeFileDialog->directory();
 
     return d->directory;
@@ -349,7 +365,7 @@
 {
     Q_D(const QXdgDesktopPortalFileDialog);
 
-    if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly))
+    if (d->nativeFileDialog && useNativeFileDialog())
         return d->nativeFileDialog->selectedFiles();
 
     QList<QUrl> files;
@@ -404,16 +420,13 @@
 {
     Q_D(QXdgDesktopPortalFileDialog);
 
-    if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) {
+    if (d->nativeFileDialog && useNativeFileDialog()) {
         d->nativeFileDialog->exec();
         return;
     }
 
     // HACK we have to avoid returning until we emit that the dialog was accepted or rejected
-    QEventLoop loop;
-    loop.connect(this, SIGNAL(accept()), SLOT(quit()));
-    loop.connect(this, SIGNAL(reject()), SLOT(quit()));
-    loop.exec();
+    d->loop.exec();
 }
 
 void QXdgDesktopPortalFileDialog::hide()
@@ -430,13 +443,10 @@
 
     initializeDialog();
 
-    d->modal = windowModality != Qt::NonModal;
-    d->winId = parent ? parent->winId() : 0;
-
-    if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly))
+    if (d->nativeFileDialog && useNativeFileDialog(OpenFallback))
         return d->nativeFileDialog->show(windowFlags, windowModality, parent);
 
-    openPortal();
+    openPortal(windowFlags, windowModality, parent);
 
     return true;
 }
@@ -466,6 +476,23 @@
     }
 }
 
+bool QXdgDesktopPortalFileDialog::useNativeFileDialog(QXdgDesktopPortalFileDialog::FallbackType fallbackType) const
+{
+    Q_D(const QXdgDesktopPortalFileDialog);
+
+    if (d->failedToOpen && fallbackType != OpenFallback)
+        return true;
+
+    if (d->fileChooserPortalVersion < 3) {
+        if (options()->fileMode() == QFileDialogOptions::Directory)
+            return true;
+        else if (options()->fileMode() == QFileDialogOptions::DirectoryOnly)
+            return true;
+    }
+
+    return false;
+}
+
 QT_END_NAMESPACE
 
 #include "moc_qxdgdesktopportalfiledialog_p.cpp"
diff -Naur a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog_p.h b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog_p.h
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog_p.h	2024-05-09 16:34:52.614649453 +0200
@@ -51,6 +51,11 @@
     Q_OBJECT
     Q_DECLARE_PRIVATE(QXdgDesktopPortalFileDialog)
 public:
+    enum FallbackType {
+        GenericFallback,
+        OpenFallback
+    };
+
     enum ConditionType : uint {
         GlobalPattern = 0,
         MimeType = 1
@@ -69,7 +74,7 @@
     };
     typedef QVector<Filter> FilterList;
 
-    QXdgDesktopPortalFileDialog(QPlatformFileDialogHelper *nativeFileDialog = nullptr);
+    QXdgDesktopPortalFileDialog(QPlatformFileDialogHelper *nativeFileDialog = nullptr, uint fileChooserPortalVersion = 0);
     ~QXdgDesktopPortalFileDialog();
 
     bool defaultNameFilterDisables() const override;
@@ -92,7 +97,8 @@
 
 private:
     void initializeDialog();
-    void openPortal();
+    void openPortal(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent);
+    bool useNativeFileDialog(FallbackType fallbackType = GenericFallback) const;
 
     QScopedPointer<QXdgDesktopPortalFileDialogPrivate> d_ptr;
 };
diff -Naur a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -153,11 +153,12 @@
 {
     Q_D(const QXdgDesktopPortalTheme);
 
-    if (type == FileDialog) {
+    if (type == FileDialog && d->fileChooserPortalVersion) {
         // Older versions of FileChooser portal don't support opening directories, therefore we fallback
         // to native file dialog opened inside the sandbox to open a directory.
-        if (d->fileChooserPortalVersion < 3 && d->baseTheme->usePlatformNativeDialog(type))
-            return new QXdgDesktopPortalFileDialog(static_cast<QPlatformFileDialogHelper*>(d->baseTheme->createPlatformDialogHelper(type)));
+        if (d->baseTheme->usePlatformNativeDialog(type))
+            return new QXdgDesktopPortalFileDialog(static_cast<QPlatformFileDialogHelper*>(d->baseTheme->createPlatformDialogHelper(type)),
+                                                   d->fileChooserPortalVersion);
 
         return new QXdgDesktopPortalFileDialog;
     }
diff -Naur a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -918,9 +918,9 @@
         return false;
     }
 
-    if (mysql_stmt_param_count(d->stmt) > 0) {// allocate memory for outvalues
-        d->outBinds = new MYSQL_BIND[mysql_stmt_param_count(d->stmt)];
-    }
+    const auto paramCount = mysql_stmt_param_count(d->stmt);
+    if (paramCount > 0) // allocate memory for outvalues
+        d->outBinds = new MYSQL_BIND[paramCount]();
 
     setSelect(d->bindInValues());
     d->preparedQuery = true;
@@ -1365,20 +1365,20 @@
     }
 
 #if MYSQL_VERSION_ID >= 50007
-    if (mysql_get_client_version() >= 50503 && mysql_get_server_version(d->mysql) >= 50503) {
-        // force the communication to be utf8mb4 (only utf8mb4 supports 4-byte characters)
-        mysql_set_character_set(d->mysql, "utf8mb4");
+    // force the communication to be utf8mb4 (only utf8mb4 supports 4-byte characters)
+    if (mysql_set_character_set(d->mysql, "utf8mb4")) {
+        // this failed, try forcing it to utf (BMP only)
+        if (mysql_set_character_set(d->mysql, "utf8"))
+            qWarning() << "MySQL: Unable to set the client character set to utf8.";
 #if QT_CONFIG(textcodec)
-        d->tc = QTextCodec::codecForName("UTF-8");
+        else
+            d->tc = codec(d->mysql);
 #endif
-    } else
-    {
-        // force the communication to be utf8
-        mysql_set_character_set(d->mysql, "utf8");
+    }
 #if QT_CONFIG(textcodec)
-        d->tc = codec(d->mysql);
+    else
+        d->tc = QTextCodec::codecForName("UTF-8");
 #endif
-    }
 #endif  // MYSQL_VERSION_ID >= 50007
 
     d->preparedQuerysEnabled = checkPreparedQueries(d->mysql);
diff -Naur a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -92,23 +92,39 @@
     return result;
 }
 
+template <size_t SizeOfChar = sizeof(SQLTCHAR)>
+void toSQLTCHARImpl(QVarLengthArray<SQLTCHAR> &result, const QString &input); // primary template undefined
+
+template <typename Container>
+void do_append(QVarLengthArray<SQLTCHAR> &result, const Container &c)
+{
+    result.append(reinterpret_cast<const SQLTCHAR *>(c.data()), c.size());
+}
+
+template <>
+void toSQLTCHARImpl<1>(QVarLengthArray<SQLTCHAR> &result, const QString &input)
+{
+    const auto u8 = input.toUtf8();
+    do_append(result, u8);
+}
+
+template <>
+void toSQLTCHARImpl<2>(QVarLengthArray<SQLTCHAR> &result, const QString &input)
+{
+    do_append(result, input);
+}
+
+template <>
+void toSQLTCHARImpl<4>(QVarLengthArray<SQLTCHAR> &result, const QString &input)
+{
+    const auto u32 = input.toUcs4();
+    do_append(result, u32);
+}
+
 inline static QVarLengthArray<SQLTCHAR> toSQLTCHAR(const QString &input)
 {
     QVarLengthArray<SQLTCHAR> result;
-    result.resize(input.size());
-    switch(sizeof(SQLTCHAR)) {
-        case 1:
-            memcpy(result.data(), input.toUtf8().data(), input.size());
-            break;
-        case 2:
-            memcpy(result.data(), input.unicode(), input.size() * 2);
-            break;
-        case 4:
-            memcpy(result.data(), input.toUcs4().data(), input.size() * 4);
-            break;
-        default:
-            qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", int(sizeof(SQLTCHAR)));
-    }
+    toSQLTCHARImpl(result, input);
     result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
     return result;
 }
@@ -763,6 +779,14 @@
     return quote;
 }
 
+static SQLRETURN qt_string_SQLSetConnectAttr(SQLHDBC handle, SQLINTEGER attr, const QString &val)
+{
+    auto encoded = toSQLTCHAR(val);
+    return SQLSetConnectAttr(handle, attr,
+                             encoded.data(),
+                             SQLINTEGER(encoded.size() * sizeof(SQLTCHAR))); // size in bytes
+}
+
 
 bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
 {
@@ -798,10 +822,7 @@
             v = val.toUInt();
             r = SQLSetConnectAttr(hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) size_t(v), 0);
         } else if (opt.toUpper() == QLatin1String("SQL_ATTR_CURRENT_CATALOG")) {
-            val.utf16(); // 0 terminate
-            r = SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG,
-                                    toSQLTCHAR(val).data(),
-                                    val.length()*sizeof(SQLTCHAR));
+            r = qt_string_SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG, val);
         } else if (opt.toUpper() == QLatin1String("SQL_ATTR_METADATA_ID")) {
             if (val.toUpper() == QLatin1String("SQL_TRUE")) {
                 v = SQL_TRUE;
@@ -816,10 +837,7 @@
             v = val.toUInt();
             r = SQLSetConnectAttr(hDbc, SQL_ATTR_PACKET_SIZE, (SQLPOINTER) size_t(v), 0);
         } else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACEFILE")) {
-            val.utf16(); // 0 terminate
-            r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE,
-                                    toSQLTCHAR(val).data(),
-                                    val.length()*sizeof(SQLTCHAR));
+            r = qt_string_SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE, val);
         } else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACE")) {
             if (val.toUpper() == QLatin1String("SQL_OPT_TRACE_OFF")) {
                 v = SQL_OPT_TRACE_OFF;
@@ -1022,9 +1040,12 @@
         return false;
     }
 
-    r = SQLExecDirect(d->hStmt,
-                       toSQLTCHAR(query).data(),
-                       (SQLINTEGER) query.length());
+    {
+        auto encoded = toSQLTCHAR(query);
+        r = SQLExecDirect(d->hStmt,
+                          encoded.data(),
+                          SQLINTEGER(encoded.size()));
+    }
     if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO && r!= SQL_NO_DATA) {
         setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
                      "Unable to execute statement"), QSqlError::StatementError, d));
@@ -1371,9 +1392,12 @@
         return false;
     }
 
-    r = SQLPrepare(d->hStmt,
-                    toSQLTCHAR(query).data(),
-                    (SQLINTEGER) query.length());
+    {
+        auto encoded = toSQLTCHAR(query);
+        r = SQLPrepare(d->hStmt,
+                       encoded.data(),
+                       SQLINTEGER(encoded.size()));
+    }
 
     if (r != SQL_SUCCESS) {
         setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
@@ -1401,7 +1425,7 @@
         SQLCloseCursor(d->hStmt);
 
     QVector<QVariant>& values = boundValues();
-    QVector<QByteArray> tmpStorage(values.count(), QByteArray()); // holds temporary buffers
+    QVector<QByteArray> tmpStorage(values.count(), QByteArray()); // targets for SQLBindParameter()
     QVarLengthArray<SQLLEN, 32> indicators(values.count());
     memset(indicators.data(), 0, indicators.size() * sizeof(SQLLEN));
 
@@ -1580,35 +1604,36 @@
             case QVariant::String:
                 if (d->unicode) {
                     QByteArray &ba = tmpStorage[i];
-                    QString str = val.toString();
+                    {
+                        const auto encoded = toSQLTCHAR(val.toString());
+                        ba = QByteArray(reinterpret_cast<const char *>(encoded.data()),
+                                        encoded.size() * sizeof(SQLTCHAR));
+                    }
+
                     if (*ind != SQL_NULL_DATA)
-                        *ind = str.length() * sizeof(SQLTCHAR);
-                    int strSize = str.length() * sizeof(SQLTCHAR);
+                        *ind = ba.size();
 
                     if (bindValueType(i) & QSql::Out) {
-                        const QVarLengthArray<SQLTCHAR> a(toSQLTCHAR(str));
-                        ba = QByteArray((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
                         r = SQLBindParameter(d->hStmt,
                                             i + 1,
                                             qParamType[bindValueType(i) & QSql::InOut],
                                             SQL_C_TCHAR,
-                                            strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
+                                            ba.size() > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
                                             0, // god knows... don't change this!
                                             0,
-                                            ba.data(),
+                                            const_cast<char *>(ba.constData()), // don't detach
                                             ba.size(),
                                             ind);
                         break;
                     }
-                    ba = QByteArray ((const char *)toSQLTCHAR(str).constData(), str.size()*sizeof(SQLTCHAR));
                     r = SQLBindParameter(d->hStmt,
                                           i + 1,
                                           qParamType[bindValueType(i) & QSql::InOut],
                                           SQL_C_TCHAR,
-                                          strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-                                          strSize,
+                                          ba.size() > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
+                                          ba.size(),
                                           0,
-                                          const_cast<char *>(ba.constData()),
+                                          const_cast<char *>(ba.constData()), // don't detach
                                           ba.size(),
                                           ind);
                     break;
@@ -1716,10 +1741,11 @@
             case QVariant::String:
                 if (d->unicode) {
                     if (bindValueType(i) & QSql::Out) {
-                        const QByteArray &first = tmpStorage.at(i);
-                        QVarLengthArray<SQLTCHAR> array;
-                        array.append((const SQLTCHAR *)first.constData(), first.size());
-                        values[i] = fromSQLTCHAR(array, first.size()/sizeof(SQLTCHAR));
+                        const QByteArray &bytes = tmpStorage.at(i);
+                        const auto strSize = bytes.size() / int(sizeof(SQLTCHAR));
+                        QVarLengthArray<SQLTCHAR> string(strSize);
+                        memcpy(string.data(), bytes.data(), strSize * sizeof(SQLTCHAR));
+                        values[i] = fromSQLTCHAR(string);
                     }
                     break;
                 }
@@ -1966,14 +1992,16 @@
     SQLSMALLINT cb;
     QVarLengthArray<SQLTCHAR> connOut(1024);
     memset(connOut.data(), 0, connOut.size() * sizeof(SQLTCHAR));
-    r = SQLDriverConnect(d->hDbc,
-                          NULL,
-                          toSQLTCHAR(connQStr).data(),
-                          (SQLSMALLINT)connQStr.length(),
-                          connOut.data(),
-                          1024,
-                          &cb,
-                          /*SQL_DRIVER_NOPROMPT*/0);
+    {
+        auto encoded = toSQLTCHAR(connQStr);
+        r = SQLDriverConnect(d->hDbc,
+                             nullptr,
+                             encoded.data(), SQLSMALLINT(encoded.size()),
+                             connOut.data(),
+                             1024,
+                             &cb,
+                             /*SQL_DRIVER_NOPROMPT*/0);
+    }
 
     if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) {
         setLastError(qMakeError(tr("Unable to connect"), QSqlError::ConnectionError, d));
@@ -2352,17 +2380,15 @@
     if (tableType.isEmpty())
         return tl;
 
-    QString joinedTableTypeString = tableType.join(QLatin1Char(','));
+    {
+        auto joinedTableTypeString = toSQLTCHAR(tableType.join(u','));
 
-    r = SQLTables(hStmt,
-                   NULL,
-                   0,
-                   NULL,
-                   0,
-                   NULL,
-                   0,
-                   toSQLTCHAR(joinedTableTypeString).data(),
-                   joinedTableTypeString.length() /* characters, not bytes */);
+        r = SQLTables(hStmt,
+                      nullptr, 0,
+                      nullptr, 0,
+                      nullptr, 0,
+                      joinedTableTypeString.data(), joinedTableTypeString.size());
+    }
 
     if (r != SQL_SUCCESS)
         qSqlWarning(QLatin1String("QODBCDriver::tables Unable to execute table list"), d);
@@ -2436,28 +2462,30 @@
                         SQL_ATTR_CURSOR_TYPE,
                         (SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
                         SQL_IS_UINTEGER);
-    r = SQLPrimaryKeys(hStmt,
-                        catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-                        catalog.length(),
-                        schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-                        schema.length(),
-                        toSQLTCHAR(table).data(),
-                        table.length() /* in characters, not in bytes */);
+    {
+        auto c = toSQLTCHAR(catalog);
+        auto s = toSQLTCHAR(schema);
+        auto t = toSQLTCHAR(table);
+        r = SQLPrimaryKeys(hStmt,
+                           catalog.isEmpty() ? nullptr : c.data(), c.size(),
+                           schema.isEmpty()  ? nullptr : s.data(), s.size(),
+                           t.data(), t.size());
+    }
 
     // if the SQLPrimaryKeys() call does not succeed (e.g the driver
     // does not support it) - try an alternative method to get hold of
     // the primary index (e.g MS Access and FoxPro)
     if (r != SQL_SUCCESS) {
-            r = SQLSpecialColumns(hStmt,
-                        SQL_BEST_ROWID,
-                        catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-                        catalog.length(),
-                        schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-                        schema.length(),
-                        toSQLTCHAR(table).data(),
-                        table.length(),
-                        SQL_SCOPE_CURROW,
-                        SQL_NULLABLE);
+        auto c = toSQLTCHAR(catalog);
+        auto s = toSQLTCHAR(schema);
+        auto t = toSQLTCHAR(table);
+        r = SQLSpecialColumns(hStmt,
+                              SQL_BEST_ROWID,
+                              catalog.isEmpty() ? nullptr : c.data(), c.size(),
+                              schema.isEmpty()  ? nullptr : s.data(), s.size(),
+                              t.data(), t.size(),
+                              SQL_SCOPE_CURROW,
+                              SQL_NULLABLE);
 
             if (r != SQL_SUCCESS) {
                 qSqlWarning(QLatin1String("QODBCDriver::primaryIndex: Unable to execute primary key list"), d);
@@ -2538,15 +2566,17 @@
                         SQL_ATTR_CURSOR_TYPE,
                         (SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
                         SQL_IS_UINTEGER);
-    r =  SQLColumns(hStmt,
-                     catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-                     catalog.length(),
-                     schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-                     schema.length(),
-                     toSQLTCHAR(table).data(),
-                     table.length(),
-                     NULL,
-                     0);
+    {
+        auto c = toSQLTCHAR(catalog);
+        auto s = toSQLTCHAR(schema);
+        auto t = toSQLTCHAR(table);
+        r =  SQLColumns(hStmt,
+                        catalog.isEmpty() ? nullptr : c.data(), c.size(),
+                        schema.isEmpty()  ? nullptr : s.data(), s.size(),
+                        t.data(), t.size(),
+                        nullptr,
+                        0);
+    }
     if (r != SQL_SUCCESS)
         qSqlWarning(QLatin1String("QODBCDriver::record: Unable to execute column list"), d);
 
diff -Naur a/src/printsupport/dialogs/images/fit-page-24.png b/src/printsupport/dialogs/images/fit-page-24.png
--- a/src/printsupport/dialogs/images/fit-page-24.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/fit-page-24.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-‰PNG
-
-   IHDR         ŕw=ř   tEXtSoftware Adobe ImageReadyqÉe<  {IDATHÇ…V[OAţŘÝŢ€JËĄU
-ą)Ń((EŤ‘řŕ%B|ňÁźŕ/ň'řf˘‰F|@ă%b@DITXnµ ĄP®ÝńĚě­Ënĺ$Ó™śťůÎ9ßśs¦
-tyňn†1đ•_›łĘt=lł›Îú†kîžy­8Đŕĺ3>čfĐ§YŐfUźŞŠGĂ3Ć1`płMGÓcpŕÖ·w°´¶żWF<Zé„fN@Cµň'ŹíťD«üE‡#€ řtŇ<Ą+†K't ¦9ČÍĂçđáŰŞyć~˙IópĎi‰…0Hŕ&sĚ
-˙˝u!•ő<ćVsBçóJĄ#G*LđźËťJŁ»µÎć˝A‹žrř<›Á<7ŐUb>˝‰şę€™}öTfŁeěGĎFćđ*čH„­l‚ed*•Ĺđř"EÚŚ®ć0†FS&}®YÄ•}ççŰjđÉÄď
-Í
-äˇĹ?Cę÷&Ćg2¸ÝŰD…×ĎĹ)MY‰ô‹,ÎŽŽDŤ źNýĄHdDBZ†¬ĺvç}§ę«)'pőp‘•Žŕp]$j‚¦µŤaŚKvkťŤŐ¨ŞđęUn/ľŇYĐ–ZLÜsÎu’T††p ąĚł@µĘ.‘EĚĹ€®×u\‘%ě%& Ń.T«]0ŐĘj›•1g‹ Ý:qžÍďĎ9x&»C5#ˇŇŻ ć0ŚŔŤ"•ŮkŠ©ĚĺwÄąB´đ=|f)‡ú°ŃĎň^ŚNŃôbłkHvÖ!TîŃł¨ Ďë«ý›Î íXŤŃrĚ;iÁ Ď-ľéĹč/ÜčiÄ~5±„›‚Ue¶L‰„Ľ|xb=­´Ćx3ąŠd{ÔvoŽFľ§EoY ˛ż“¤"j:¦s}ś<ď&đˇ±E|ťPłÜFo{Äť"~x™ş)ŢSxĺžn
-‹˙÷Č´ROF4p­FÜ)â‡óôÂ#xů)…ţł1«M«EOŁÎőŰÉ´	Îĺ Ô%^>Ü»ÚźG˘®čEÜď´Iá”$;Łř»µO{ˇµ÷ Ň0Ná
-O
-ÚűÇÜxŐČ8™
-ŹŹXŤŠ"‹BdE}ÍFQ»`ó‘/Ne©¬Ś€eČ’$@ůZQ´uÉ^ôřý‚ó/‹Ů\tŽ}öo\ţŕŇL‡ÚYÎ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/fit-page-32.png b/src/printsupport/dialogs/images/fit-page-32.png
--- a/src/printsupport/dialogs/images/fit-page-32.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/fit-page-32.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-‰PNG
-
-   IHDR           szzô  ůIDATx^µWYh\eţîť{çÎLö­IÓ%›MLkZ‹UJ_Ä%VôAń]đE|ôÝW´ôIDAEÓŠ Ą–ÔRÍŇ’¤t˛¶“…É$™N'3ÎĚ˝˙ý˙źËl=Éáüů·ďl˙974ş4÷\đ<Ź$„s®śS{ô˝ÚŮŔůŔđâcÇŻ€Č‚"xíůA<Núb|š•`
-(ŔV qČÓĆÂ"!uŹ¸Ä,]b_ş.:ZĽŠ¨›Ľ˙±A)­Č„FţŇÇ&đÉ—×qţâĆŻ-ŕętńÄ.öňEŘ«»´žĆ­xWčÜ×—ďâó‹wđéwS ŞĎmŤ¶3y,¬Ą™‰°ż#†÷_	‚ńˇ ·î%1ß‚NÍ1›ĄpłYV&ŠxÄ±•ü<V©?Ć(‘źę€N-am%ÄĘPot2ä†JÖăÁDčpW# ™¤ĺpU¤ĺĎwam+‹?ßć(k=ŹUrý4±©…-ô´Fq| ‚[ĺ *ĺ <Íí2®ßü>Ź÷ÎEŘÁÓ­×Ü˙ëÍUÜ^Jˇ»-ŠwĎAŘ2ŮâćXXSŔ«ž„‚ĎŤĘűß:}Žma‘˛ű—Ëxůą>Ř–©WAĆ˙{v+›ô÷4ăŤ“ý´‡Ái˙a®µžˇ˛J
-ţáůWOôct¨…˘‹s,őr;»ĽŤän;đć©öxÍgŁZęŔ"XB0ź:¶G¶ň8ľ¶‹’Ë‹H$!“+Űcxi´WzÇU}Dç‚ÇŐK15	O12ĐÎn.”<ědňFCt4Gp€ňĆ4 K±âŔÝŐo®Úv5 ý¨ ›Ü"Äć‡X8@€,WOŹçjżŻ@˝ ń¬a€Á‰a…8’
-¬lsBígčVň€ćTČíląIšdö
-ÔŢVJhÝ°~¨Mj.ł+Űx”+rĚŁa‡-ĘJÜ;vűş$0ł+ąžRĚB–®^§wO¤´·=*UÜ×â Tr±´‘ˇ&”gä9Á®¦ę
-¨äÚ‹
-7łâŹô·˛ë} b¸·‰¤‡ąŐü5ł^Ůj,R>é˛ą"+1NµýźůMDě^8ÖĂJH	 “ćžî„2¨¤đŰÍű4ďňÚ“kxĚjŻ¤z)ćxnlďá«Ëóčˇâ2MŤe5–×OöqĆ ďd=+vöé^|u	ł«»2űç¤)g…Q+	·ćY’ĚÝţÎ™'¸čU
-Ü·ČUŠX¤ÄŘ‰CřńÚ
-ćî§%P&WÔkJőg¸Ľ™	<Cřq|˛űĚëľ2ěĄŽ&Ét^m±Qţąęŕç¤ÓćÎľýóŢ>=ÇâV,/
-z€c>µŽ»ävť¨QŐ˙MÎŕŘ&şZ˘ű¨—Ó8Â——\·L™…öb\hâľ@ő‰T–ď#ćšşJńGçžô'äfÝŐA`Ý†aPŻhä\Q(B¦É!ˇ1˘Ž%ÂWĂĄ’W±ÓoĐýRq“b”ŇăjĄ8DösŕPO1x:µ`-Npźý0	Z7ÓÜ_îS=<ú™ň{yOöáŽ#0s†ň kä8,¤-Ć¶đšŻ¸!Ř\\üŻŕĽ”’yľh @âBS XşÔŘTŕŞÉiŠ”„"Ą2cýúÖž)3    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/fit-width-24.png b/src/printsupport/dialogs/images/fit-width-24.png
--- a/src/printsupport/dialogs/images/fit-width-24.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/fit-width-24.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-‰PNG
-
-   IHDR         ŕw=ř   tEXtSoftware Adobe ImageReadyqÉe<  dIDATHÇŤVĎ«NA~Î™óńE~$¬¤°řĘÂŠ»Ů(+)+eí_°óŘKŮY!ĹÂFĺn/)őĄŘ ą~^ÇçÎűXĚŻwćĚąLMsš9ç}ŢçyĚiŕÇ˝§s’ I	iú}dkm/ťáÔĺsGw€Î?=üB8Ŕdś ¸UüjEpëŃ<|†6Álů÷ ›dô‘ ¬™ćĐ +Ç^˘@Űgé}G}ś˝Ďä‡–Ö3·Fř%·(7b ÜĘY$ď,>ĺ|ŕ©üHY3Bum\
-DÉ2‹cAÖ´JC`©ż÷>›Eúł(„(ĎĆ:ČŤDO1,:Í -@ż°¸~˙eŇ\‡®rWh7ľFż°Ńű03€€ľú˝Çí's|üňË}PT/%—BH|úÖăÁň;|ýą %ÉV‰±üę~ô  Wn<˙Żžn2Xű˝Ž•7ź±4Űíś@%ČBâčl/ŢŻ® ®^ZŞ8Č#âćµ»/01ďß{R Č%bű–	Îź8„=;¦y#+źŐŢ®m›qćŘ>lťvľóŽ¤iĚ¤kpńô,˛Čó˛‹^8y V\'µ",MC±éVÍJŠęöśŘH|f 2ĐŤ‹ydŤ°Ţ¸µ’îŚ+Rď˘]2
-€ :cę‘„XŞ^¤ä	«¨«Ńk 4č:‰1cÜ‹én`µ‘ŁD¦mĐ™Ö´c€u+Č/ Rdú„1-Śi#@gÚx$˛`LťĘmÓŔÓ:ăĆtť{í¦wž˝ţ˛¨4ŘĽ—źŔ_•$’a	ĎhJ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/fit-width-32.png b/src/printsupport/dialogs/images/fit-width-32.png
--- a/src/printsupport/dialogs/images/fit-width-32.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/fit-width-32.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-‰PNG
-
-   IHDR           szzô   tEXtSoftware Adobe ImageReadyqÉe<  ŽIDATXĂµWKoMQţÎŢç*­+(iZ‰4`h Â@™™HĚýÄ@ŚŚhH'âIE<ŠńHő%­Vő®Ďŕ<öÚŹs	ű&÷<÷^ßúÖÚßZ'ß#	¨Ź „đď‘ Üµ¨wý÷ĘgđçxzţôÁE Č5 wBă$P®ŕî…@Âxń¦š[Żă îF „Ŕ©#{ú(ÄL×Ąb…ĹQŠŁŕęÝ·ő| 0>DŰ`}d˙šć€<|ŘĽh;¸$Š:BŠ-4Ha›2z“őju9ć> ŘűÚ#·
-űf|-‘ Ł•ŘŞmZ9­í¨ŰŃ:y”„1oRĺ=˝¤e2ž±eµc’ $áf“ńj˝ç©ă_,Ď•ś´'!AőŚ«ĹĽdP"„Ŕ`(pÍ9%"Ł„ŇÔ{Ň¬˛ßQMGb&…ę·ş¶Ž‹7žą˝\Sź’f'Ý—'_ŕçÚş
-QĚP€źÉßVpéćs|ť˙ˇd7 2 ľ2ł°Š+·_cöűŞN@Oq#**ß|ZÄµ{ođóW/Đ	ß¸¦š‡kż“Ź?âĂĚ˛«mRLO§gđâĂĽ—.?ÂßŚŽuľM˝›ĂŇJă#C-9Pz7;;‹=ćçć`˛–b$%űvmFçó2^®¸ggw˝]ŕ<ŐŚSkőÜ«Ů¶±^żO-(rzttÝîşßp˙Ő: `÷řx]l@Tý'©iä80f1şs›6˘'TúŃ”Rśa˙ŢlÝ˛€[Oľ€YŽŤ6™€~‚çŰ6ç8yh[·t‘Yú[µ	€®VÖZŚŤlÇą]lčX°ą"kŠE3GÇaó$Ń“â^˘EŠő­<ít:°H|˘nżňĽS¶aŞ%Ł´—cŃB®U»Oü…ôr@ ĄđšDŻ’ę9â$†]@Ô„"hĎ«Ćł <wĆ	kŚ_ŔRŰĐ1Öu•Á)ę+Ł
-€Ćsk‹HÔ%›Ę$ýp ¤9€Ú¸µ¦]ŠEâÖ4ž úéý_yN!˛,µ¬)ŚçÖ´wĹ=I´WÁW’V=Ń•®4™Q†ËŁµY{Wś˝b2 ż~˛°ÖŔk˛Â°‚)vhďŃ¬â´ĂšĚ6Ćú ¬5íR|ýÁű@ĺ4đ•śüRv[öŻ>˛ţ÷řRÎĆCüjĎ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/print-24.png b/src/printsupport/dialogs/images/print-24.png
--- a/src/printsupport/dialogs/images/print-24.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/print-24.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-‰PNG
-
-   IHDR         ×©ÍĘ  ąPLTE˙˙˙      ‹‹‹   ŤŤŤqqqVVVhhh      ‰‰‰UUU               žž ¬¬­                  ÜÜŢňňň   îîî›››ččęÁÁÁŮŮÜŕŕŕJJJÍÍÍŽŽŽµµµôôő«««LLLIIIDDDËËĎ®®®ćććąąąôôôăăăââäŚŚŚŐŐŮÔÔŘ´´´)))úúúÇÇÇ§§§bbb(((ÄÄČ'''÷÷řßßßÝÝŕććč˙˙˙űűü___HHH”””¶¶¶ŮŮŮ“““ţţţřřůPPP   đđň???ääćńńóKKKĂĂČżżÄűűűęęërrrżżż&&&řřřĺĺçÜÜÜĂĂĂŇŇÖßßá...××ÚÂÂÇŃŃÔ^^^ĘĘĘëëíőőöwwwˇˇˇĐĐÔ000éééhhi··˝ůůůżżŔ111UUUłłłęęěĚĚĐ»»»ŰŰŢŠŠŠşşż‡‡‡GGG&&'¨¨¨ăăĺ™™™­­Żîîďňňó˛˛¸ĽĽÁ°°°``aÝÝÝđđńŻŻŻ¬¬˛öö÷ýýýĆĆĘŤŤŤ˘ÂL   tRNS ?…€đűó>8Ą' ţţ) ňňą®â  kIDATx^…Ěcs$QÇáO4q–mŚmŰVlŰ^ŰüÄ{z*č©Jeoî­˙Su˙Ô!ş©Ł:7u¶čDí0v7tuk®e¬»K ˛ QźN…ät= €¤ô¬¶QŃlj*µ’ä
-ä8ž˙[5:cö™řŚ=ć¬f¶ó¸@‰Ż—/_„Ś+.§kĹZ|ůŁĽ®P<Ç´]aôé´žaşwZLŔˇ(š;”Ŕ¬VëÚ‰ 50 ż×ëő†W©ŐŐ”>>ü î9’ś´X,Y”…Ď$IÎąy€“ćoĐ,ĽfôË~š¦'Ž=ž`xj*zv'č7łü)Śe}Ń×??|]n†šËž¨Źe1 N­6ŮľŽţ9ßq-Qµ´o3©Ő@żXÚç§ŢĆ‰ńłqbĐ1Ô'÷ ČđřéÖ{;ńáăf¤xXŚm=xřöV˝Źż˙ňţN´zŇ‹Ü¦	R!÷öĚęd"Š°í    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/print-32.png b/src/printsupport/dialogs/images/print-32.png
--- a/src/printsupport/dialogs/images/print-32.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/print-32.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-‰PNG
-
-   IHDR           szzô   sBIT|d   	pHYs  v  v}Ő‚Ě   tEXtSoftware www.inkscape.org›î<  /IDATXĂĹW=H[QľyyůSC˘Dl•Ú‚Bmť:¸XĐŃµĹ"TpVŃŕĐA\ÄĄ›îĄ
-ť
-.Rpp¨Ö"ŠQóóň^ĎwŢ»//?F“H{ŕz5Ţű}ßůąçŢ¨†a˙ijĄş\®Ç4=©“ă9yP“ ˛Ç´ů[=ěäÄ[šjŕŇu](ŠR—†šS Ó4Mx<xR5ó}ęëNŮ¬ĆäŞŞV%äŘ[·€t:mŇbŐ}Żt mš–#ŮÚ,..6OOOMĄŇLŹt]µE”â\#Ç©K§3„ˇ9^• "$	tÝ`pÔ‚ÇŁ
-·[ˇt(śdE
-4S Bď! Ńh4@Ő	hlldd2Éäşnz•Í–Ź‚ąĆ˝ą.+2™,ĎŔŞ©2xdPżßGŢk\Śn·ŰŠ‚‹‡é˝Q~#zŔ¸ł&&&â!ţ€ @Ř|}ť°˝^/§ kĚ¸¬cnŘi2×jĽWZĽ¶¶ĆŃ¤”đšŁŁŁËĺĺĺfJĄěHřý~ ŘŰŰ§§§Dě>_ž</ \
-4[j CCC´ßgiŽśş¶9ůÇÍÍĎX$€¤łłS|ů˛f‡XI(G¤™9€ŃĐĐŔŃ9˘)9í`1HáýCXSS”ŃAZ
-"000 ŚŤŤlşĽĽőŢ)ä=
-|Nő Ř"T¶ÓŞńńq¨Çŕ@,+Á§- pÎ‹"Ę](]]]eďďďßz!ăł˘  žśś”€r™ËbCuă¨ÜĹT[ŔşS ň]lHA5Ößß_öóťťŠaŰŰŰ˘··Wěîî
-g(	Ýůů9‡M¦ ¸8{‚<óĺú Ň‰DěFgőŰ xaaAlnn–S5&EŤŚŚ™™ţűŕŕ€Ĺ ůŐŐ•˝huuUÁ	;°¶¶¶DKKź DV:lG Ď_×gggüÂ´ĐXěłuÉ÷€›Gń{ ßjÍËëÓ§ŹÔőŇŚLů¶Ľ¸¸(MÁááˇ- Çť$­­m"Ťđeň2Ę?J¤ ó1âl·mmŹÄńńĆ˘ŰŻŕj.055…¶^ŮlÍ!ĘŰ÷p8,zz^Řŕ)Ŕ|żŠ$/_ľ ˘÷‡ÉÉÉwčđŽ'^S m6(ţCŻĐ$ŽËđđ°hoďáp¨$R€łHĺu+SĐ××GláŁGö˝Ę"‡űěQ šµ CĚÎÎŠŃŃQ*Č3*Ć&Gř+żŚťQčî~&ŢĽy-Ö××˙łŞ'
-geeEĽ˙Ű/<żĎ÷óz^†Ł¦7áüü<ńąžĎÍÍýđz=ZzŔÓ§]7KKKŻnóľ˘ ËâtŹ‰;ľßU0tŻxĄ÷tĆĄj§_§    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/printer-24.png b/src/printsupport/dialogs/images/printer-24.png
--- a/src/printsupport/dialogs/images/printer-24.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/printer-24.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,4 @@
+‰PNG
+
+   IHDR         ×©ÍĘ  ąPLTE˙˙˙      ‹‹‹   ŤŤŤqqqVVVhhh      ‰‰‰UUU               žž ¬¬­                  ÜÜŢňňň   îîî›››ččęÁÁÁŮŮÜŕŕŕJJJÍÍÍŽŽŽµµµôôő«««LLLIIIDDDËËĎ®®®ćććąąąôôôăăăââäŚŚŚŐŐŮÔÔŘ´´´)))úúúÇÇÇ§§§bbb(((ÄÄČ'''÷÷řßßßÝÝŕććč˙˙˙űűü___HHH”””¶¶¶ŮŮŮ“““ţţţřřůPPP   đđň???ääćńńóKKKĂĂČżżÄűűűęęërrrżżż&&&řřřĺĺçÜÜÜĂĂĂŇŇÖßßá...××ÚÂÂÇŃŃÔ^^^ĘĘĘëëíőőöwwwˇˇˇĐĐÔ000éééhhi··˝ůůůżżŔ111UUUłłłęęěĚĚĐ»»»ŰŰŢŠŠŠşşż‡‡‡GGG&&'¨¨¨ăăĺ™™™­­Żîîďňňó˛˛¸ĽĽÁ°°°``aÝÝÝđđńŻŻŻ¬¬˛öö÷ýýýĆĆĘŤŤŤ˘ÂL   tRNS ?…€đűó>8Ą' ţţ) ňňą®â  kIDATx^…Ěcs$QÇáO4q–mŚmŰVlŰ^ŰüÄ{z*č©Jeoî­˙Su˙Ô!ş©Ł:7u¶čDí0v7tuk®e¬»K ˛ QźN…ät= €¤ô¬¶QŃlj*µ’ä
+ä8ž˙[5:cö™řŚ=ć¬f¶ó¸@‰Ż—/_„Ś+.§kĹZ|ůŁĽ®P<Ç´]aôé´žaşwZLŔˇ(š;”Ŕ¬VëÚ‰ 50 ż×ëő†W©ŐŐ”>>ü î9’ś´X,Y”…Ď$IÎąy€“ćoĐ,ĽfôË~š¦'Ž=ž`xj*zv'č7łü)Śe}Ń×??|]n†šËž¨Źe1 N­6ŮľŽţ9ßq-Qµ´o3©Ő@żXÚç§ŢĆ‰ńłqbĐ1Ô'÷ ČđřéÖ{;ńáăf¤xXŚm=xřöV˝Źż˙ňţN´zŇ‹Ü¦	R!÷öĚęd"Š°í    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/printer-32.png b/src/printsupport/dialogs/images/printer-32.png
--- a/src/printsupport/dialogs/images/printer-32.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/printer-32.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,12 @@
+‰PNG
+
+   IHDR           szzô   sBIT|d   	pHYs  v  v}Ő‚Ě   tEXtSoftware www.inkscape.org›î<  /IDATXĂĹW=H[QľyyůSC˘Dl•Ú‚Bmť:¸XĐŃµĹ"TpVŃŕĐA\ÄĄ›îĄ
+ť
+.Rpp¨Ö"ŠQóóň^ĎwŢ»//?F“H{ŕz5Ţű}ßůąçŢ¨†a˙ijĄş\®Ç4=©“ă9yP“ ˛Ç´ů[=ěäÄ[šjŕŇu](ŠR—†šS Ó4Mx<xR5ó}ęëNŮ¬ĆäŞŞV%äŘ[·€t:mŇbŐ}Żt mš–#ŮÚ,..6OOOMĄŇLŹt]µE”â\#Ç©K§3„ˇ9^• "$	tÝ`pÔ‚ÇŁ
+·[ˇt(śdE
+4S Bď! Ńh4@Ő	hlldd2Éäşnz•Í–Ź‚ąĆ˝ą.+2™,ĎŔŞ©2xdPżßGŢk\Śn·ŰŠ‚‹‡é˝Q~#zŔ¸ł&&&â!ţ€ @Ř|}ť°˝^/§ kĚ¸¬cnŘi2×jĽWZĽ¶¶ĆŃ¤”đšŁŁŁËĺĺĺfJĄěHřý~ ŘŰŰ§§§Dě>_ž</ \
+4[j CCC´ßgiŽśş¶9ůÇÍÍĎX$€¤łłS|ů˛f‡XI(G¤™9€ŃĐĐŔŃ9˘)9í`1HáýCXSS”ŃAZ
+"000 ŚŤŤlşĽĽőŢ)ä=
+|Nő Ř"T¶ÓŞńńq¨Çŕ@,+Á§- pÎ‹"Ę](]]]eďďďßz!ăł˘  žśś”€r™ËbCuă¨ÜĹT[ŔşS ň]lHA5Ößß_öóťťŠaŰŰŰ˘··Wěîî
+g(	Ýůů9‡M¦ ¸8{‚<óĺú Ň‰DěFgőŰ xaaAlnn–S5&EŤŚŚ™™ţűŕŕ€Ĺ ůŐŐ•˝huuUÁ	;°¶¶¶DKKź DV:lG Ď_×gggüÂ´ĐXěłuÉ÷€›Gń{ ßjÍËëÓ§ŹÔőŇŚLů¶Ľ¸¸(MÁááˇ- Çť$­­m"Ťđeň2Ę?J¤ ó1âl·mmŹÄńńĆ˘ŰŻŕj.055…¶^ŮlÍ!ĘŰ÷p8,zz^Řŕ)Ŕ|żŠ$/_ľ ˘÷‡ÉÉÉwčđŽ'^S m6(ţCŻĐ$ŽËđđ°hoďáp¨$R€łHĺu+SĐ××GláŁGö˝Ę"‡űěQ šµ CĚÎÎŠŃŃQ*Č3*Ć&Gř+żŚťQčî~&ŢĽy-Ö××˙łŞ'
+geeEĽ˙Ű/<żĎ÷óz^†Ł¦7áüü<ńąžĎÍÍýđz=ZzŔÓ§]7KKKŻnóľ˘ ËâtŹ‰;ľßU0tŻxĄ÷tĆĄj§_§    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-page-multi-24.png b/src/printsupport/dialogs/images/view-page-multi-24.png
--- a/src/printsupport/dialogs/images/view-page-multi-24.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/view-page-multi-24.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-‰PNG
-
-   IHDR         oŞŻ   tEXtSoftware Adobe ImageReadyqÉe<  (IDAT8Ťí“±JA„ŻŘ$‚"Fb!AC´UĐŇwđ1µő	RřŠB;»ÜîĚXÜÓÝ¶éŽăŮÝ™±»űgP H‚‚Dę÷§>÷¶šŚşľš¤”$IIŞt€đŔílŢ…1P)Ą‡—Ź: s0˛ăňdT›Ś‘”t:V©:6Ś@v”ŤšŚ’ŇăëgŃ	0<ÇĹtT®Đd’¤éÁŽ¤?5Đp." vaŚĄ§·/z=^YžŮăl˛[¬i2
-ŕŃţvUŁ@˘ž3˛ŁÜb¬¸8˙.ű{`iÇÂq~<,®5#Ŕxosuů~ŹTĆ@ąC)­Î ĄAß6˝2Q“1P7łů_ŢĹeđ—ńďÂX—­»¶îÚşk˙îÚů‚ńô«Dě    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-page-multi-32.png b/src/printsupport/dialogs/images/view-page-multi-32.png
--- a/src/printsupport/dialogs/images/view-page-multi-32.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/view-page-multi-32.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-‰PNG
-
-   IHDR           szzô   tEXtSoftware Adobe ImageReadyqÉe<  ÎIDATX…íUÍJ1Űm+Š˘Ö(ĄbŃ‹xńŕ;čsřb^<ůô%ŠüCđâŢÚ$c&łťM+ČěÁM“lňÍÎ7óe`ĘmĆ_\ßőQ#‚1¶§Ł6k^»9B»9±‹łyoâ;@›ç§;nŽîéç!’aĆZSvTJĂĺMżĆoAJC6lÖăgéd¬b1~‹€óÚŽ˝§wPÚzl=×vşąUÖOö×9Ä0ůwö@wsY<w$$·†;WFr‹Éu€6	Ü{ţ`@Ę(cŁ…ÍńŢšcSŚ Řm/± câ^¦™ŤJŮOí1°lżůL™xl…f6ˇ†Łî*§  &ëm§µČůÄě./´˛‰É× ˛úŻ_Ž…0R¬jÎĄ†í‡ťůČÄb‚ o·6“LÍ¬ŢLdzL± třńíűw.IÍšsI¬(ź‹a)@j5ç$—~ŰGw™ćIµłő„źŔ#@ĆFaôEĆ¨ŐkUhÔhXcŁÄb‚\Ý>Čő’Ę&jGÂÉj‹Éu`Ű
-é/ĘqPe9.ËqYŽËr\–ă˛˙»r<őö8
-	ŚbąĆ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-page-one-24.png b/src/printsupport/dialogs/images/view-page-one-24.png
--- a/src/printsupport/dialogs/images/view-page-one-24.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/view-page-one-24.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-‰PNG
-
-   IHDR         ŕw=ř   tEXtSoftware Adobe ImageReadyqÉe<  8IDATHÇ•VËjA=wŞł‘ŕŰ„ŕ” ‚A	făßá—ąüqˇ˙ rbÁE]N×qŃ5ŐŹéńjCSCwßŞ>§NuÝ Żß­I$ˇ$Hd«´uT¶·–÷đôĹóoĂ€žßA98m!RŔěś &«fŁ*^ľYO?C€Vfó`š$ć´	ŔžkÎ˛łmµňÁ'gJ(ŞD´Y~GŐdcţ>ľżž‡Ú5n^D¶?ńď"đ¤ ŕß0Xĺ ;źh1ÉYâ™éAVaŤ@3ëżś9nYÓá4kOîíz‚»*šn\Jwf–*‹3ĄLµ”©jUGM şd#ßÖąßó˘ŰŕÓéOZ­śśLźQ1UGwwšE¶şý‚ČĘŞoNw¤…ŠT“ŞTÄŞš[y˘zźč–“T5ŁfŠ« S5ŻżţLÔĐ¬ScUhÉŽQńřđZ‚E&ŐŰ{ç‹dÉĽ°Ř((EéĺÝ€ŕ˙*8óźPé2‚©Ř>űUÝŞUŃXP#MEŠ‡űWĽw,# pkg;)µ ŞFÓˇ'FÍ”öDŐşüK“)DéSDSś~˙Ý-˛ŮmvŚ
-%đčđ*¶D–¤Ă °wůśSÔK°÷h»ůjX!Č€[2,! Ć¨ŤŠZzPń"Ddđţ=Ł(Z€%ţK)«D2$ç"‚Ň÷â[ôęýÉü/‹?ťµŮąz ţ ě_ţĄľ~¨Ń    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-page-one-32.png b/src/printsupport/dialogs/images/view-page-one-32.png
--- a/src/printsupport/dialogs/images/view-page-one-32.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/view-page-one-32.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-‰PNG
-
-   IHDR           szzô  ńIDATx^ÍWÍjAî™Ý›˘QQ\ŤEA$‚>>‡ŹćĹ‹/`zöę_ĐDĽ$AŻ[eM>¶ľÔôt÷ŐŢÔVUOÓ_ÍWŐ•Ţ.q¤7ďwźŞj˛żäÚ>2hĚQ'úÂµqť‰„µĐ6>Ľ|q˙h0ć&Şo#84Đ87ÚĎ'Ŕm#{©ôĚfw˛ Ä žoßHăˇü‚•1ßDV¬(´@‹Hzµłkóčˇ¸ak¨k­,(Ą(âkyçfž!˛Ą©@RĺĆôh±Z J*hđiďŕ8wbÎr•KhřYúśpîÉ˝KaCH9 ±¸uu-Ë‚‚×Ľ i‡"Äľ”T¬<‚&x\;Ěîäd B$—Źű Y†çjŐl	¶ÓN-ž?®ÍđňáŘZśŃŽÁ7‰)`#f3+Ą 2Tw‹ŕ±úC€f´Ź!7Ž~Ţ?Ą¬ţQŐÓŹ©€lßÝ í,Č±řn.Öbp¤ťi!őýđÉ$­ź‚ú5pÎĂ¦$×áH&m2ŔńĺÇ!éźj@ž’—Çw.&!CíV¬g6ŻśMZi@fĺŐ/Ł40őś¦eňrBÁ^Ł č§jÄżţ<Ę©§µýËÁ¦<ş˝ŽÜ‡žP«‰ŕúĺ3N{ˇ cĎ'őQ“ˇz Â§S7 ňMuŔă7h´o—f+ýożţ+źŐ/>Źđ4<ĽuW2ľ`“Ĺ×µŤÓî#Ŕü*YJ|seŔdłV„«……°ĄŇĺQ“Ńń#¸¦YßűŹ! ŘŢďżŤ”˙†ŕD<Ř<ďŕóYOKH¸b,ÖOM_*'éOlB8–|fŇĽă¬ĆAPÚĹ+¨§¤ë:5énA´Z1č‹3± iG`S>8]Ú¤kŢŠc
-sšđëÇ^ú¬@űŔLA»“ŇkŔÁá{‡Řt?‹An·â×ďľŹşmő­_ÉÂZÁĂ˙güÉ­Âcµ…    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-pages-facing-24.png b/src/printsupport/dialogs/images/view-pages-facing-24.png
--- a/src/printsupport/dialogs/images/view-pages-facing-24.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/view-pages-facing-24.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,6 @@
+‰PNG
+
+   IHDR         oŞŻ   tEXtSoftware Adobe ImageReadyqÉe<  ^IDAT8Ë…•ßnÓ0Ć'ÍÖ±¶ęViZ'¦Ń©“ĆzĂbBĽ/‰„¸ĺ–¸áhB”iPˇ­hd]bÎ;é˛*±R+µ±żóťă$z÷éÔZ PŘŃe±Wŕnč>ŇAűA\Íŕ}„^ď+n@?×7„Ţ~ř˛ŃZ}ţ¤_ÁĽ~ń owĹ?Ů°–‰¬‡`U<*{V3–B“í@ťŚ/ÓĚ¤™˝u—zç1ÉMú}2+1/G;{$K?ŢíBľ•Źś—$¬ą-e(4Kˇĺ:Éň·ÓeŞ–‰Ü˘J}_˘Z–mDöŃŁM¬Űřß<ű1ą*1/Žú¬šC“•†»b­ô>¨˘Ršq¸śAł­wrHíŐ2ŔéWl|=űSČN©?ÜŰ ¬ůť“yvö{VbŽ·]hąóűýŽ¸éÓĄÜi ‹Wc˝”ë=˛úbs˛ť
+(ŽX%#)Éîé9f„‹-•¤Ýn»Ůp ™›ó‹ż%ćŮÁVî6iokŽ˘ěfP	oLÜĐ÷GÖŘBó‚r&¬STÇ G*ăřÇ“kÎWZJýp§˝Ţ¤×‚ČĚoÍdš”§Ăža94Cő7×T^’kqJěÄ›(î3N°<Z(ă…|ąćPž{¨g$ýY†üśŢ ÚâĄf°Ýę¬Ĺřa/fó3tu )ýČĄĆ`…ôZP9	
+´B­ĂPK!¨
+†=ro@ś	h‚ű»ŞfśG+qDCŘŇé9”ŤZjńčÍÇoţ;Ł ôÁ@î×4©fpđ?SĐ5Ź§l    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-pages-facing-32.png b/src/printsupport/dialogs/images/view-pages-facing-32.png
--- a/src/printsupport/dialogs/images/view-pages-facing-32.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/view-pages-facing-32.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,10 @@
+‰PNG
+
+   IHDR           szzô   tEXtSoftware Adobe ImageReadyqÉe<  .IDATX…ĹWMOA}Ý3.QCDAb‚Ł‘ŕĹ!Ż^üţ7ăŮ«‰xđG`“%@ ÂF!,ÓUú«zf!ŰăÁIz§§{^MŐ«W5;
+ >~ÝZg0 f†ś§g9/Ť©ÉÎĄűWa‰·Żź|)€ÁĚnłźů5±‡¸çť˝l˙*,ěŻ˛0đfm	ő#:eďÎąh>|ţŽ[7Ć±¶2źŤ}÷i  á"iżµEń®/ŤŽ%Dh	€#™rĂGÔëź©˝ˇĎńćš-÷P;ą5ÖăJéŘěˇ2c‘›ł›ŰńjuÁ=Ś§gčgaŃ#ĆŁĹ™č={ď9ˇ;”*ÇČ&ĆĘl¬H'„3)v×,h‡)&6»=G!Ł2TŁĐ®­ŻÎ§9ĐTčîŹŚĄ4ŃĺĹéJh""Ei7łLtĘ,lC„˛śBŃ„ĽŐŚąű˝ˇ6Řřm»ă(LiŚk/Wć]ĆfÔTŘ>8{)ďM§µÜhŁŃÇëńN‘ŤM4
+7ű¸Ě˙ôe`’óüÇÎď@™©ŃççkOď$‘g
+;żN˛°"±–îN	!I‰×4qhĂ~oěZ‘…MEHv#6dA%‹wżČ!‰16MAC„äZÔÖžk&˘ˇ¤T^<žą÷:8;Ż°{xš…MDHd_Đ÷ç®§PDbŇ†D„N©ł±©Ť‘>Y!^ÍžňČ@{l"BăDŘ=8qşF"hĽp4>_žŤ9%†aĆŕÜ`ż×ŰdŔŔÂěd-Š¦xĄj&C(•…­1Ŕ0dEč;eţbÎŁArFó±5Zq {G§CĽ~ö`&2@¶é.˙2°µ2¬Ś­‚Ű7ÇĂźČ´öÓz.
+"«ˇĐ*›2ŕůó4rěëJ)…Fˇ5´VQ„-°ZÂ›ÄĘ•†R
+ZŰŤ°`/Ű(C­TCY 3¤µ‚V
+Ú(<˙€Mč”…Ĺ+ĺÎvnŮˇ|Î1
+í±R„ď7~¦ĺÂCJHŠŘ~ď÷ú­°Cż¨ţÇńsÝH#ľđÎÓ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-page-sided-24.png b/src/printsupport/dialogs/images/view-page-sided-24.png
--- a/src/printsupport/dialogs/images/view-page-sided-24.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/view-page-sided-24.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-‰PNG
-
-   IHDR         oŞŻ   tEXtSoftware Adobe ImageReadyqÉe<  ^IDAT8Ë…•ßnÓ0Ć'ÍÖ±¶ęViZ'¦Ń©“ĆzĂbBĽ/‰„¸ĺ–¸áhB”iPˇ­hd]bÎ;é˛*±R+µ±żóťă$z÷éÔZ PŘŃe±Wŕnč>ŇAűA\Íŕ}„^ď+n@?×7„Ţ~ř˛ŃZ}ţ¤_ÁĽ~ń owĹ?Ů°–‰¬‡`U<*{V3–B“í@ťŚ/ÓĚ¤™˝u—zç1ÉMú}2+1/G;{$K?ŢíBľ•Źś—$¬ą-e(4Kˇĺ:Éň·ÓeŞ–‰Ü˘J}_˘Z–mDöŃŁM¬Űřß<ű1ą*1/Žú¬šC“•†»b­ô>¨˘Ršq¸śAł­wrHíŐ2ŔéWl|=űSČN©?ÜŰ ¬ůť“yvö{VbŽ·]hąóűýŽ¸éÓĄÜi ‹Wc˝”ë=˛úbs˛ť
-(ŽX%#)Éîé9f„‹-•¤Ýn»Ůp ™›ó‹ż%ćŮÁVî6iokŽ˘ěfP	oLÜĐ÷GÖŘBó‚r&¬STÇ G*ăřÇ“kÎWZJýp§˝Ţ¤×‚ČĚoÍdš”§Ăža94Cő7×T^’kqJěÄ›(î3N°<Z(ă…|ąćPž{¨g$ýY†üśŢ ÚâĄf°Ýę¬Ĺřa/fó3tu )ýČĄĆ`…ôZP9	
-´B­ĂPK!¨
-†=ro@ś	h‚ű»ŞfśG+qDCŘŇé9”ŤZjńčÍÇoţ;Ł ôÁ@î×4©fpđ?SĐ5Ź§l    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-page-sided-32.png b/src/printsupport/dialogs/images/view-page-sided-32.png
--- a/src/printsupport/dialogs/images/view-page-sided-32.png	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/images/view-page-sided-32.png	1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-‰PNG
-
-   IHDR           szzô   tEXtSoftware Adobe ImageReadyqÉe<  .IDATX…ĹWMOA}Ý3.QCDAb‚Ł‘ŕĹ!Ż^üţ7ăŮ«‰xđG`“%@ ÂF!,ÓUú«zf!ŰăÁIz§§{^MŐ«W5;
- >~ÝZg0 f†ś§g9/Ť©ÉÎĄűWa‰·Żź|)€ÁĚnłźů5±‡¸çť˝l˙*,ěŻ˛0đfm	ő#:eďÎąh>|ţŽ[7Ć±¶2źŤ}÷i  á"iżµEń®/ŤŽ%Dh	€#™rĂGÔëź©˝ˇĎńćš-÷P;ą5ÖăJéŘěˇ2c‘›ł›ŰńjuÁ=Ś§gčgaŃ#ĆŁĹ™č={ď9ˇ;”*ÇČ&ĆĘl¬H'„3)v×,h‡)&6»=G!Ł2TŁĐ®­ŻÎ§9ĐTčîŹŚĄ4ŃĺĹéJh""Ei7łLtĘ,lC„˛śBŃ„ĽŐŚąű˝ˇ6Řřm»ă(LiŚk/Wć]ĆfÔTŘ>8{)ďM§µÜhŁŃÇëńN‘ŤM4
-7ű¸Ě˙ôe`’óüÇÎď@™©ŃççkOď$‘g
-;żN˛°"±–îN	!I‰×4qhĂ~oěZ‘…MEHv#6dA%‹wżČ!‰16MAC„äZÔÖžk&˘ˇ¤T^<žą÷:8;Ż°{xš…MDHd_Đ÷ç®§PDbŇ†D„N©ł±©Ť‘>Y!^ÍžňČ@{l"BăDŘ=8qşF"hĽp4>_žŤ9%†aĆŕÜ`ż×ŰdŔŔÂěd-Š¦xĄj&C(•…­1Ŕ0dEč;eţbÎŁArFó±5Zq {G§CĽ~ö`&2@¶é.˙2°µ2¬Ś­‚Ű7ÇĂźČ´öÓz.
-"«ˇĐ*›2ŕůó4rěëJ)…Fˇ5´VQ„-°ZÂ›ÄĘ•†R
-ZŰŤ°`/Ű(C­TCY 3¤µ‚V
-Ú(<˙€Mč”…Ĺ+ĺÎvnŮˇ|Î1
-í±R„ď7~¦ĺÂCJHŠŘ~ď÷ú­°Cż¨ţÇńsÝH#ľđÎÓ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-pages-overview-24.png b/src/printsupport/dialogs/images/view-pages-overview-24.png
--- a/src/printsupport/dialogs/images/view-pages-overview-24.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/view-pages-overview-24.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,4 @@
+‰PNG
+
+   IHDR         oŞŻ   tEXtSoftware Adobe ImageReadyqÉe<  (IDAT8Ťí“±JA„ŻŘ$‚"Fb!AC´UĐŇwđ1µő	RřŠB;»ÜîĚXÜÓÝ¶éŽăŮÝ™±»űgP H‚‚Dę÷§>÷¶šŚşľš¤”$IIŞt€đŔílŢ…1P)Ą‡—Ź: s0˛ăňdT›Ś‘”t:V©:6Ś@v”ŤšŚ’ŇăëgŃ	0<ÇĹtT®Đd’¤éÁŽ¤?5Đp." vaŚĄ§·/z=^YžŮăl˛[¬i2
+ŕŃţvUŁ@˘ž3˛ŁÜb¬¸8˙.ű{`iÇÂq~<,®5#Ŕxosuů~ŹTĆ@ąC)­Î ĄAß6˝2Q“1P7łů_ŢĹeđ—ńďÂX—­»¶îÚşk˙îÚů‚ńô«Dě    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-pages-overview-32.png b/src/printsupport/dialogs/images/view-pages-overview-32.png
--- a/src/printsupport/dialogs/images/view-pages-overview-32.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/view-pages-overview-32.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,5 @@
+‰PNG
+
+   IHDR           szzô   tEXtSoftware Adobe ImageReadyqÉe<  ÎIDATX…íUÍJ1Űm+Š˘Ö(ĄbŃ‹xńŕ;čsřb^<ůô%ŠüCđâŢÚ$c&łťM+ČěÁM“lňÍÎ7óe`ĘmĆ_\ßőQ#‚1¶§Ł6k^»9B»9±‹łyoâ;@›ç§;nŽîéç!’aĆZSvTJĂĺMżĆoAJC6lÖăgéd¬b1~‹€óÚŽ˝§wPÚzl=×vşąUÖOö×9Ä0ůwö@wsY<w$$·†;WFr‹Éu€6	Ü{ţ`@Ę(cŁ…ÍńŢšcSŚ Řm/± câ^¦™ŤJŮOí1°lżůL™xl…f6ˇ†Łî*§  &ëm§µČůÄě./´˛‰É× ˛úŻ_Ž…0R¬jÎĄ†í‡ťůČÄb‚ o·6“LÍ¬ŢLdzL± třńíűw.IÍšsI¬(ź‹a)@j5ç$—~ŰGw™ćIµłő„źŔ#@ĆFaôEĆ¨ŐkUhÔhXcŁÄb‚\Ý>Čő’Ę&jGÂÉj‹Éu`Ű
+é/ĘqPe9.ËqYŽËr\–ă˛˙»r<őö8
+	ŚbąĆ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-pages-single-24.png b/src/printsupport/dialogs/images/view-pages-single-24.png
--- a/src/printsupport/dialogs/images/view-pages-single-24.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/view-pages-single-24.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,4 @@
+‰PNG
+
+   IHDR         ŕw=ř   tEXtSoftware Adobe ImageReadyqÉe<  8IDATHÇ•VËjA=wŞł‘ŕŰ„ŕ” ‚A	făßá—ąüqˇ˙ rbÁE]N×qŃ5ŐŹéńjCSCwßŞ>§NuÝ Żß­I$ˇ$Hd«´uT¶·–÷đôĹóoĂ€žßA98m!RŔěś &«fŁ*^ľYO?C€Vfó`š$ć´	ŔžkÎ˛łmµňÁ'gJ(ŞD´Y~GŐdcţ>ľżž‡Ú5n^D¶?ńď"đ¤ ŕß0Xĺ ;źh1ÉYâ™éAVaŤ@3ëżś9nYÓá4kOîíz‚»*šn\Jwf–*‹3ĄLµ”©jUGM şd#ßÖąßó˘ŰŕÓéOZ­śśLźQ1UGwwšE¶şý‚ČĘŞoNw¤…ŠT“ŞTÄŞš[y˘zźč–“T5ŁfŠ« S5ŻżţLÔĐ¬ScUhÉŽQńřđZ‚E&ŐŰ{ç‹dÉĽ°Ř((EéĺÝ€ŕ˙*8óźPé2‚©Ř>űUÝŞUŃXP#MEŠ‡űWĽw,# pkg;)µ ŞFÓˇ'FÍ”öDŐşüK“)DéSDSś~˙Ý-˛ŮmvŚ
+%đčđ*¶D–¤Ă °wůśSÔK°÷h»ůjX!Č€[2,! Ć¨ŤŠZzPń"Ddđţ=Ł(Z€%ţK)«D2$ç"‚Ň÷â[ôęýÉü/‹?ťµŮąz ţ ě_ţĄľ~¨Ń    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/view-pages-single-32.png b/src/printsupport/dialogs/images/view-pages-single-32.png
--- a/src/printsupport/dialogs/images/view-pages-single-32.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/view-pages-single-32.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,4 @@
+‰PNG
+
+   IHDR           szzô  ńIDATx^ÍWÍjAî™Ý›˘QQ\ŤEA$‚>>‡ŹćĹ‹/`zöę_ĐDĽ$AŻ[eM>¶ľÔôt÷ŐŢÔVUOÓ_ÍWŐ•Ţ.q¤7ďwźŞj˛żäÚ>2hĚQ'úÂµqť‰„µĐ6>Ľ|q˙h0ć&Şo#84Đ87ÚĎ'Ŕm#{©ôĚfw˛ Ä žoßHăˇü‚•1ßDV¬(´@‹Hzµłkóčˇ¸ak¨k­,(Ą(âkyçfž!˛Ą©@RĺĆôh±Z J*hđiďŕ8wbÎr•KhřYúśpîÉ˝KaCH9 ±¸uu-Ë‚‚×Ľ i‡"Äľ”T¬<‚&x\;Ěîäd B$—Źű Y†çjŐl	¶ÓN-ž?®ÍđňáŘZśŃŽÁ7‰)`#f3+Ą 2Tw‹ŕ±úC€f´Ź!7Ž~Ţ?Ą¬ţQŐÓŹ©€lßÝ í,Č±řn.Öbp¤ťi!őýđÉ$­ź‚ú5pÎĂ¦$×áH&m2ŔńĺÇ!éźj@ž’—Çw.&!CíV¬g6ŻśMZi@fĺŐ/Ł40őś¦eňrBÁ^Ł č§jÄżţ<Ę©§µýËÁ¦<ş˝ŽÜ‡žP«‰ŕúĺ3N{ˇ cĎ'őQ“ˇz Â§S7 ňMuŔă7h´o—f+ýożţ+źŐ/>Źđ4<ĽuW2ľ`“Ĺ×µŤÓî#Ŕü*YJ|seŔdłV„«……°ĄŇĺQ“Ńń#¸¦YßűŹ! ŘŢďżŤ”˙†ŕD<Ř<ďŕóYOKH¸b,ÖOM_*'éOlB8–|fŇĽă¬ĆAPÚĹ+¨§¤ë:5énA´Z1č‹3± iG`S>8]Ú¤kŢŠc
+sšđëÇ^ú¬@űŔLA»“ŇkŔÁá{‡Řt?‹An·â×ďľŹşmő­_ÉÂZÁĂ˙güÉ­Âcµ…    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/zoom-fit-page-24.png b/src/printsupport/dialogs/images/zoom-fit-page-24.png
--- a/src/printsupport/dialogs/images/zoom-fit-page-24.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/zoom-fit-page-24.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,12 @@
+‰PNG
+
+   IHDR         ŕw=ř   tEXtSoftware Adobe ImageReadyqÉe<  {IDATHÇ…V[OAţŘÝŢ€JËĄU
+ą)Ń((EŤ‘řŕ%B|ňÁźŕ/ň'řf˘‰F|@ă%b@DITXnµ ĄP®ÝńĚě­Ënĺ$Ó™śťůÎ9ßśs¦
+tyňn†1đ•_›łĘt=lł›Îú†kîžy­8Đŕĺ3>čfĐ§YŐfUźŞŠGĂ3Ć1`płMGÓcpŕÖ·w°´¶żWF<Zé„fN@Cµň'ŹíťD«üE‡#€ řtŇ<Ą+†K't ¦9ČÍĂçđáŰŞyć~˙IópĎi‰…0Hŕ&sĚ
+˙˝u!•ő<ćVsBçóJĄ#G*LđźËťJŁ»µÎć˝A‹žrř<›Á<7ŐUb>˝‰şę€™}öTfŁeěGĎFćđ*čH„­l‚ed*•Ĺđř"EÚŚ®ć0†FS&}®YÄ•}ççŰjđÉÄď
+Í
+äˇĹ?Cę÷&Ćg2¸ÝŰD…×ĎĹ)MY‰ô‹,ÎŽŽDŤ źNýĄHdDBZ†¬ĺvç}§ę«)'pőp‘•Žŕp]$j‚¦µŤaŚKvkťŤŐ¨ŞđęUn/ľŇYĐ–ZLÜsÎu’T††p ąĚł@µĘ.‘EĚĹ€®×u\‘%ě%& Ń.T«]0ŐĘj›•1g‹ Ý:qžÍďĎ9x&»C5#ˇŇŻ ć0ŚŔŤ"•ŮkŠ©ĚĺwÄąB´đ=|f)‡ú°ŃĎň^ŚNŃôbłkHvÖ!TîŃł¨ Ďë«ý›Î íXŤŃrĚ;iÁ Ď-ľéĹč/ÜčiÄ~5±„›‚Ue¶L‰„Ľ|xb=­´Ćx3ąŠd{ÔvoŽFľ§EoY ˛ż“¤"j:¦s}ś<ď&đˇ±E|ťPłÜFo{Äť"~x™ş)ŢSxĺžn
+‹˙÷Č´ROF4p­FÜ)â‡óôÂ#xů)…ţł1«M«EOŁÎőŰÉ´	Îĺ Ô%^>Ü»ÚźG˘®čEÜď´Iá”$;Łř»µO{ˇµ÷ Ň0Ná
+O
+ÚűÇÜxŐČ8™
+ŹŹXŤŠ"‹BdE}ÍFQ»`ó‘/Ne©¬Ś€eČ’$@ůZQ´uÉ^ôřý‚ó/‹Ů\tŽ}öo\ţŕŇL‡ÚYÎ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/zoom-fit-page-32.png b/src/printsupport/dialogs/images/zoom-fit-page-32.png
--- a/src/printsupport/dialogs/images/zoom-fit-page-32.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/zoom-fit-page-32.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,12 @@
+‰PNG
+
+   IHDR           szzô  ůIDATx^µWYh\eţîť{çÎLö­IÓ%›MLkZ‹UJ_Ä%VôAń]đE|ôÝW´ôIDAEÓŠ Ą–ÔRÍŇ’¤t˛¶“…É$™N'3ÎĚ˝˙ý˙źËl=Éáüů·ďl˙974ş4÷\đ<Ź$„s®śS{ô˝ÚŮŔůŔđâcÇŻ€Č‚"xíůA<Núb|š•`
+(ŔV qČÓĆÂ"!uŹ¸Ä,]b_ş.:ZĽŠ¨›Ľ˙±A)­Č„FţŇÇ&đÉ—×qţâĆŻ-ŕętńÄ.öňEŘ«»´žĆ­xWčÜ×—ďâó‹wđéwS ŞĎmŤ¶3y,¬Ą™‰°ż#†÷_	‚ńˇ ·î%1ß‚NÍ1›ĄpłYV&ŠxÄ±•ü<V©?Ć(‘źę€N-am%ÄĘPot2ä†JÖăÁDčpW# ™¤ĺpU¤ĺĎwam+‹?ßć(k=ŹUrý4±©…-ô´Fq| ‚[ĺ *ĺ <Íí2®ßü>Ź÷ÎEŘÁÓ­×Ü˙ëÍUÜ^Jˇ»-ŠwĎAŘ2ŮâćXXSŔ«ž„‚ĎŤĘűß:}Žma‘˛ű—Ëxůą>Ř–©WAĆ˙{v+›ô÷4ăŤ“ý´‡Ái˙a®µžˇ˛J
+ţáůWOôct¨…˘‹s,őr;»ĽŤän;đć©öxÍgŁZęŔ"XB0ź:¶G¶ň8ľ¶‹’Ë‹H$!“+Űcxi´WzÇU}Dç‚ÇŐK15	O12ĐÎn.”<ědňFCt4Gp€ňĆ4 K±âŔÝŐo®Úv5 ý¨ ›Ü"Äć‡X8@€,WOŹçjżŻ@˝ ń¬a€Á‰a…8’
+¬lsBígčVň€ćTČíląIšdö
+ÔŢVJhÝ°~¨Mj.ł+Űx”+rĚŁa‡-ĘJÜ;vűş$0ł+ąžRĚB–®^§wO¤´·=*UÜ×â Tr±´‘ˇ&”gä9Á®¦ę
+¨äÚ‹
+7łâŹô·˛ë} b¸·‰¤‡ąŐü5ł^Ůj,R>é˛ą"+1NµýźůMDě^8ÖĂJH	 “ćžî„2¨¤đŰÍű4ďňÚ“kxĚjŻ¤z)ćxnlďá«Ëóčˇâ2MŤe5–×OöqĆ ďd=+vöé^|u	ł«»2űç¤)g…Q+	·ćY’ĚÝţÎ™'¸čU
+Ü·ČUŠX¤ÄŘ‰CřńÚ
+ćî§%P&WÔkJőg¸Ľ™	<Cřq|˛űĚëľ2ěĄŽ&Ét^m±Qţąęŕç¤ÓćÎľýóŢ>=ÇâV,/
+z€c>µŽ»ävť¨QŐ˙MÎŕŘ&şZ˘ű¨—Ó8Â——\·L™…öb\hâľ@ő‰T–ď#ćšşJńGçžô'äfÝŐA`Ý†aPŻhä\Q(B¦É!ˇ1˘Ž%ÂWĂĄ’W±ÓoĐýRq“b”ŇăjĄ8DösŕPO1x:µ`-Npźý0	Z7ÓÜ_îS=<ú™ň{yOöáŽ#0s†ň kä8,¤-Ć¶đšŻ¸!Ř\\üŻŕĽ”’yľh @âBS XşÔŘTŕŞÉiŠ”„"Ą2cýúÖž)3    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/zoom-fit-width-24.png b/src/printsupport/dialogs/images/zoom-fit-width-24.png
--- a/src/printsupport/dialogs/images/zoom-fit-width-24.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/zoom-fit-width-24.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,5 @@
+‰PNG
+
+   IHDR         ŕw=ř   tEXtSoftware Adobe ImageReadyqÉe<  dIDATHÇŤVĎ«NA~Î™óńE~$¬¤°řĘÂŠ»Ů(+)+eí_°óŘKŮY!ĹÂFĺn/)őĄŘ ą~^ÇçÎűXĚŻwćĚąLMsš9ç}ŢçyĚiŕÇ˝§s’ I	iú}dkm/ťáÔĺsGw€Î?=üB8Ŕdś ¸UüjEpëŃ<|†6Álů÷ ›dô‘ ¬™ćĐ +Ç^˘@Űgé}G}ś˝Ďä‡–Ö3·Fř%·(7b ÜĘY$ď,>ĺ|ŕ©üHY3Bum\
+DÉ2‹cAÖ´JC`©ż÷>›Eúł(„(ĎĆ:ČŤDO1,:Í -@ż°¸~˙eŇ\‡®rWh7ľFż°Ńű03€€ľú˝Çí's|üňË}PT/%—BH|úÖăÁň;|ýą %ÉV‰±üę~ô  Wn<˙Żžn2Xű˝Ž•7ź±4Űíś@%ČBâčl/ŢŻ® ®^ZŞ8Č#âćµ»/01ďß{R Č%bű–	Îź8„=;¦y#+źŐŢ®m›qćŘ>lťvľóŽ¤iĚ¤kpńô,˛Čó˛‹^8y V\'µ",MC±éVÍJŠęöśŘH|f 2ĐŤ‹ydŤ°Ţ¸µ’îŚ+Rď˘]2
+€ :cę‘„XŞ^¤ä	«¨«Ńk 4č:‰1cÜ‹én`µ‘ŁD¦mĐ™Ö´c€u+Č/ Rdú„1-Śi#@gÚx$˛`LťĘmÓŔÓ:ăĆtť{í¦wž˝ţ˛¨4ŘĽ—źŔ_•$’a	ĎhJ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/images/zoom-fit-width-32.png b/src/printsupport/dialogs/images/zoom-fit-width-32.png
--- a/src/printsupport/dialogs/images/zoom-fit-width-32.png	1970-01-01 01:00:00.000000000 +0100
+++ b/src/printsupport/dialogs/images/zoom-fit-width-32.png	2024-05-09 16:34:52.614649453 +0200
@@ -0,0 +1,6 @@
+‰PNG
+
+   IHDR           szzô   tEXtSoftware Adobe ImageReadyqÉe<  ŽIDATXĂµWKoMQţÎŢç*­+(iZ‰4`h Â@™™HĚýÄ@ŚŚhH'âIE<ŠńHő%­Vő®Ďŕ<öÚŹs	ű&÷<÷^ßúÖÚßZ'ß#	¨Ź „đď‘ Üµ¨wý÷ĘgđçxzţôÁE Č5 wBă$P®ŕî…@Âxń¦š[Żă îF „Ŕ©#{ú(ÄL×Ąb…ĹQŠŁŕęÝ·ő| 0>DŰ`}d˙šć€<|ŘĽh;¸$Š:BŠ-4Ha›2z“őju9ć> ŘűÚ#·
+űf|-‘ Ł•ŘŞmZ9­í¨ŰŃ:y”„1oRĺ=˝¤e2ž±eµc’ $áf“ńj˝ç©ă_,Ď•ś´'!AőŚ«ĹĽdP"„Ŕ`(pÍ9%"Ł„ŇÔ{Ň¬˛ßQMGb&…ę·ş¶Ž‹7žą˝\Sź’f'Ý—'_ŕçÚş
+QĚP€źÉßVpéćs|ť˙ˇd7 2 ľ2ł°Š+·_cöűŞN@Oq#**ß|ZÄµ{ođóW/Đ	ß¸¦š‡kż“Ź?âĂĚ˛«mRLO§gđâĂĽ—.?ÂßŚŽuľM˝›ĂŇJă#C-9Pz7;;‹=ćçć`˛–b$%űvmFçó2^®¸ggw˝]ŕ<ŐŚSkőÜ«Ů¶±^żO-(rzttÝîşßp˙Ő: `÷řx]l@Tý'©iä80f1şs›6˘'TúŃ”Rśa˙ŢlÝ˛€[Oľ€YŽŤ6™€~‚çŰ6ç8yh[·t‘Yú[µ	€®VÖZŚŤlÇą]lčX°ą"kŠE3GÇaó$Ń“â^˘EŠő­<ít:°H|˘nżňĽS¶aŞ%Ł´—cŃB®U»Oü…ôr@ ĄđšDŻ’ę9â$†]@Ô„"hĎ«Ćł <wĆ	kŚ_ŔRŰĐ1Öu•Á)ę+Ł
+€Ćsk‹HÔ%›Ę$ýp ¤9€Ú¸µ¦]ŠEâÖ4ž úéý_yN!˛,µ¬)ŚçÖ´wĹ=I´WÁW’V=Ń•®4™Q†ËŁµY{Wś˝b2 ż~˛°ÖŔk˛Â°‚)vhďŃ¬â´ĂšĚ6Ćú ¬5íR|ýÁű@ĺ4đ•śüRv[öŻ>˛ţ÷řRÎĆCüjĎ    IEND®B`‚
\ Pas de fin de ligne Ă  la fin du fichier
diff -Naur a/src/printsupport/dialogs/qprintdialog.qrc b/src/printsupport/dialogs/qprintdialog.qrc
--- a/src/printsupport/dialogs/qprintdialog.qrc	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/qprintdialog.qrc	2024-05-09 16:34:52.614649453 +0200
@@ -1,9 +1,9 @@
 <!DOCTYPE RCC><RCC version="1.0">
 <qresource prefix="/qt-project.org/dialogs/qprintpreviewdialog">
-<file>images/fit-page-24.png</file>
-<file>images/fit-page-32.png</file>
-<file>images/fit-width-24.png</file>
-<file>images/fit-width-32.png</file>
+<file>images/zoom-fit-page-24.png</file>
+<file>images/zoom-fit-page-32.png</file>
+<file>images/zoom-fit-width-24.png</file>
+<file>images/zoom-fit-width-32.png</file>
 <file>images/go-first-24.png</file>
 <file>images/go-first-32.png</file>
 <file>images/go-last-24.png</file>
@@ -18,14 +18,14 @@
 <file>images/layout-portrait-32.png</file>
 <file>images/page-setup-24.png</file>
 <file>images/page-setup-32.png</file>
-<file>images/print-24.png</file>
-<file>images/print-32.png</file>
-<file>images/view-page-multi-24.png</file>
-<file>images/view-page-multi-32.png</file>
-<file>images/view-page-one-24.png</file>
-<file>images/view-page-one-32.png</file>
-<file>images/view-page-sided-24.png</file>
-<file>images/view-page-sided-32.png</file>
+<file>images/printer-24.png</file>
+<file>images/printer-32.png</file>
+<file>images/view-pages-overview-24.png</file>
+<file>images/view-pages-overview-32.png</file>
+<file>images/view-pages-single-24.png</file>
+<file>images/view-pages-single-32.png</file>
+<file>images/view-pages-facing-24.png</file>
+<file>images/view-pages-facing-32.png</file>
 <file>images/zoom-in-24.png</file>
 <file>images/zoom-in-32.png</file>
 <file>images/zoom-out-24.png</file>
diff -Naur a/src/printsupport/dialogs/qprintpreviewdialog.cpp b/src/printsupport/dialogs/qprintpreviewdialog.cpp
--- a/src/printsupport/dialogs/qprintpreviewdialog.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/printsupport/dialogs/qprintpreviewdialog.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -352,7 +352,7 @@
 static inline void qt_setupActionIcon(QAction *action, QLatin1String name)
 {
     QLatin1String imagePrefix(":/qt-project.org/dialogs/qprintpreviewdialog/images/");
-    QIcon icon;
+    QIcon icon = QIcon::fromTheme(name);
     icon.addFile(imagePrefix + name + QLatin1String("-24.png"), QSize(24, 24));
     icon.addFile(imagePrefix + name + QLatin1String("-32.png"), QSize(32, 32));
     action->setIcon(icon);
@@ -383,8 +383,8 @@
     fitPageAction->setObjectName(QLatin1String("fitPageAction"));
     fitWidthAction->setCheckable(true);
     fitPageAction->setCheckable(true);
-    qt_setupActionIcon(fitWidthAction, QLatin1String("fit-width"));
-    qt_setupActionIcon(fitPageAction, QLatin1String("fit-page"));
+    qt_setupActionIcon(fitWidthAction, QLatin1String("zoom-fit-width"));
+    qt_setupActionIcon(fitPageAction, QLatin1String("zoom-fit-page"));
     QObject::connect(fitGroup, SIGNAL(triggered(QAction*)), q, SLOT(_q_fit(QAction*)));
 
     // Zoom
@@ -410,9 +410,9 @@
     singleModeAction = modeGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Show single page"));
     facingModeAction = modeGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Show facing pages"));
     overviewModeAction = modeGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Show overview of all pages"));
-    qt_setupActionIcon(singleModeAction, QLatin1String("view-page-one"));
-    qt_setupActionIcon(facingModeAction, QLatin1String("view-page-sided"));
-    qt_setupActionIcon(overviewModeAction, QLatin1String("view-page-multi"));
+    qt_setupActionIcon(singleModeAction, QLatin1String("view-pages-single"));
+    qt_setupActionIcon(facingModeAction, QLatin1String("view-pages-facing"));
+    qt_setupActionIcon(overviewModeAction, QLatin1String("view-pages-overview"));
     singleModeAction->setObjectName(QLatin1String("singleModeAction"));
     facingModeAction->setObjectName(QLatin1String("facingModeAction"));
     overviewModeAction->setObjectName(QLatin1String("overviewModeAction"));
@@ -426,7 +426,7 @@
     printerGroup = new QActionGroup(q);
     printAction = printerGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Print"));
     pageSetupAction = printerGroup->addAction(QCoreApplication::translate("QPrintPreviewDialog", "Page setup"));
-    qt_setupActionIcon(printAction, QLatin1String("print"));
+    qt_setupActionIcon(printAction, QLatin1String("printer"));
     qt_setupActionIcon(pageSetupAction, QLatin1String("page-setup"));
     QObject::connect(printAction, SIGNAL(triggered(bool)), q, SLOT(_q_print()));
     QObject::connect(pageSetupAction, SIGNAL(triggered(bool)), q, SLOT(_q_pageSetup()));
diff -Naur a/src/testlib/qabstractitemmodeltester.cpp b/src/testlib/qabstractitemmodeltester.cpp
--- a/src/testlib/qabstractitemmodeltester.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/testlib/qabstractitemmodeltester.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -454,7 +454,7 @@
 
     // Common error test #2, make sure that a second level index has a parent
     // that is the first level index.
-    if (model->rowCount(topIndex) > 0) {
+    if (model->rowCount(topIndex) > 0 && model->columnCount(topIndex) > 0) {
         QModelIndex childIndex = model->index(0, 0, topIndex);
         MODELTESTER_VERIFY(childIndex.isValid());
         MODELTESTER_COMPARE(model->parent(childIndex), topIndex);
diff -Naur a/src/testlib/qasciikey.cpp b/src/testlib/qasciikey.cpp
--- a/src/testlib/qasciikey.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/testlib/qasciikey.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -498,6 +498,11 @@
     case Qt::Key_LaunchE : return 0; // = 0x10b0,
     case Qt::Key_LaunchF : return 0; // = 0x10b1,
 
+    // Keypad navigation keys
+    case Qt::Key_Select : return 0; // = 0x01010000
+    case Qt::Key_Yes : return 0; // = 0x01010001
+    case Qt::Key_No : return 0; // = 0x01010002
+
     default: QTEST_ASSERT(false); return 0;
     }
 }
diff -Naur a/src/widgets/accessible/qaccessiblewidgets.cpp b/src/widgets/accessible/qaccessiblewidgets.cpp
--- a/src/widgets/accessible/qaccessiblewidgets.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/accessible/qaccessiblewidgets.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -900,7 +900,7 @@
             underlineStyleValue = QStringLiteral("wave"); // this is not correct, but provides good approximation at least
             break;
         default:
-            qWarning() << "Unknown QTextCharFormat::â€‹UnderlineStyle value " << underlineStyle << " could not be translated to IAccessible2 value";
+            qWarning() << "Unknown QTextCharFormat::UnderlineStyle value " << underlineStyle << " could not be translated to IAccessible2 value";
             break;
     }
     if (!underlineStyleValue.isNull()) {
diff -Naur a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
--- a/src/widgets/dialogs/qcolordialog.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/dialogs/qcolordialog.cpp	2024-05-09 16:34:52.614649453 +0200
@@ -78,7 +78,10 @@
 #include "qwindow.h"
 
 #include "private/qdialog_p.h"
+#include "private/qguiapplication_p.h"
 
+#include <qpa/qplatformservices.h>
+#include <qpa/qplatformintegration.h>
 #include <algorithm>
 
 QT_BEGIN_NAMESPACE
@@ -801,6 +804,10 @@
 
 void QColorLuminancePicker::mouseMoveEvent(QMouseEvent *m)
 {
+    if (m->buttons() == Qt::NoButton) {
+        m->ignore();
+        return;
+    }
     setVal(y2val(m->y()));
 }
 void QColorLuminancePicker::mousePressEvent(QMouseEvent *m)
@@ -935,6 +942,10 @@
 void QColorPicker::mouseMoveEvent(QMouseEvent *m)
 {
     QPoint p = m->pos() - contentsRect().topLeft();
+    if (m->buttons() == Qt::NoButton) {
+        m->ignore();
+        return;
+    }
     setCol(p);
     emit newCol(hue, sat);
 }
@@ -1611,6 +1622,20 @@
 void QColorDialogPrivate::_q_pickScreenColor()
 {
     Q_Q(QColorDialog);
+
+    auto *platformServices = QGuiApplicationPrivate::platformIntegration()->services();
+    if (platformServices->hasCapability(QPlatformServices::Capability::ColorPicking)) {
+        if (auto *colorPicker = platformServices->colorPicker(q->windowHandle())) {
+            q->connect(colorPicker, &QPlatformServiceColorPicker::colorPicked, q,
+                       [q, colorPicker](const QColor &color) {
+                           colorPicker->deleteLater();
+                           q->setCurrentColor(color);
+                       });
+            colorPicker->pickColor();
+            return;
+        }
+    }
+
     if (!colorPickingEventFilter)
         colorPickingEventFilter = new QColorPickingEventFilter(this, q);
     q->installEventFilter(colorPickingEventFilter);
diff -Naur a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -400,12 +400,7 @@
         const QString tooltip = index.isValid() ?
               d->textForRole(Qt::ToolTipRole, index.data(Qt::ToolTipRole), option.locale, precision) :
               QString();
-        QRect rect;
-        if (index.isValid()) {
-            const QRect r = view->visualRect(index);
-            rect = QRect(view->mapToGlobal(r.topLeft()), r.size());
-        }
-        QToolTip::showText(he->globalPos(), tooltip, view, rect);
+        QToolTip::showText(he->globalPos(), tooltip, view->viewport(), option.rect);
         event->setAccepted(!tooltip.isEmpty());
         break;
         }
diff -Naur a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
--- a/src/widgets/itemviews/qabstractitemview.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/itemviews/qabstractitemview.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -2347,11 +2347,12 @@
 
 #if !defined(QT_NO_CLIPBOARD) && !defined(QT_NO_SHORTCUT)
     if (event == QKeySequence::Copy) {
-        QVariant variant;
-        if (d->model)
-            variant = d->model->data(currentIndex(), Qt::DisplayRole);
-        if (variant.canConvert<QString>())
-            QGuiApplication::clipboard()->setText(variant.toString());
+        const QModelIndex index = currentIndex();
+        if (index.isValid() && d->model) {
+            const QVariant variant = d->model->data(index, Qt::DisplayRole);
+            if (variant.canConvert<QString>())
+                QGuiApplication::clipboard()->setText(variant.toString());
+        }
         event->accept();
     }
 #endif
diff -Naur a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
--- a/src/widgets/itemviews/qlistview.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/itemviews/qlistview.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -3388,6 +3388,7 @@
 */
 void QListView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
 {
+    QAbstractItemView::currentChanged(current, previous);
 #ifndef QT_NO_ACCESSIBILITY
     if (QAccessible::isActive()) {
         if (current.isValid()) {
@@ -3398,7 +3399,6 @@
         }
     }
 #endif
-    QAbstractItemView::currentChanged(current, previous);
 }
 
 /*!
diff -Naur a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
--- a/src/widgets/itemviews/qtableview.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/itemviews/qtableview.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -1013,6 +1013,7 @@
 int QTableViewPrivate::widthHintForIndex(const QModelIndex &index, int hint, const QStyleOptionViewItem &option) const
 {
     Q_Q(const QTableView);
+    const int oldHint = hint;
     QWidget *editor = editorForIndex(index).widget.data();
     if (editor && persistent.contains(editor)) {
         hint = qMax(hint, editor->sizeHint().width());
@@ -1021,6 +1022,17 @@
         hint = qBound(min, hint, max);
     }
     hint = qMax(hint, q->itemDelegate(index)->sizeHint(option, index).width());
+
+    if (hasSpans()) {
+        auto span = spans.spanAt(index.column(), index.row());
+        if (span && span->m_left == index.column() && span->m_top == index.row()) {
+            // spans are screwed up when sections are moved
+            const auto left = logicalColumn(span->m_left);
+            for (int i = 1; i <= span->width(); ++i)
+               hint -= q->columnWidth(visualColumn(left + i));
+        }
+        hint = std::max(hint, oldHint);
+    }
     return hint;
 }
 
@@ -1053,6 +1065,11 @@
         option.rect.setHeight(height);
         option.rect.setX(q->columnViewportPosition(index.column()));
         option.rect.setWidth(q->columnWidth(index.column()));
+        if (hasSpans()) {
+            auto span = spans.spanAt(index.column(), index.row());
+            if (span && span->m_left == index.column() && span->m_top == index.row())
+                option.rect.setWidth(std::max(option.rect.width(), visualSpanRect(*span).width()));
+        }
         // 1px less space when grid is shown (see drawCell)
         if (showGrid)
             option.rect.setWidth(option.rect.width() - 1);
diff -Naur a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h
--- a/src/widgets/kernel/qaction.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/kernel/qaction.h	2024-05-09 16:34:52.617982808 +0200
@@ -81,7 +81,7 @@
     Q_PROPERTY(MenuRole menuRole READ menuRole WRITE setMenuRole NOTIFY changed)
     Q_PROPERTY(bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu NOTIFY changed)
     Q_PROPERTY(bool shortcutVisibleInContextMenu READ isShortcutVisibleInContextMenu WRITE setShortcutVisibleInContextMenu NOTIFY changed)
-    Q_PROPERTY(Priority priority READ priority WRITE setPriority)
+    Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY changed)
 
 public:
     // note this is copied into qplatformmenu.h, which must stay in sync
diff -Naur a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
--- a/src/widgets/kernel/qwidget.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/kernel/qwidget.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -1272,7 +1272,6 @@
         win->setProperty("_q_showWithoutActivating", QVariant(true));
     if (q->testAttribute(Qt::WA_MacAlwaysShowToolWindow))
         win->setProperty("_q_macAlwaysShowToolWindow", QVariant(true));
-    setNetWmWindowTypes(true); // do nothing if none of WA_X11NetWmWindowType* is set
     win->setFlags(flags);
     fixPosIncludesFrame();
     if (q->testAttribute(Qt::WA_Moved)
@@ -1345,6 +1344,7 @@
         Q_ASSERT(id != WId(0));
         setWinId(id);
     }
+    setNetWmWindowTypes(true); // do nothing if none of WA_X11NetWmWindowType* is set
 
     // Check children and create windows for them if necessary
     q_createNativeChildrenAndSetParent(q);
diff -Naur a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
--- a/src/widgets/styles/qcommonstyle.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/styles/qcommonstyle.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -1708,8 +1708,9 @@
                     alignment |= Qt::TextHideMnemonic;
                 rect.translate(shiftX, shiftY);
                 p->setFont(toolbutton->font);
+                const QString text = d->toolButtonElideText(toolbutton, rect, alignment);
                 proxy()->drawItemText(p, rect, alignment, toolbutton->palette,
-                             opt->state & State_Enabled, toolbutton->text,
+                             opt->state & State_Enabled, text,
                              QPalette::ButtonText);
             } else {
                 QPixmap pm;
diff -Naur a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
--- a/src/widgets/styles/qfusionstyle.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/styles/qfusionstyle.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -1772,14 +1772,6 @@
             proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget);
         }
         break;
-    case CE_PushButtonLabel:
-        if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
-            QStyleOptionButton b(*button);
-            // no PM_ButtonShiftHorizontal and PM_ButtonShiftVertical for fusion style
-            b.state &= ~(State_On | State_Sunken);
-            QCommonStyle::drawControl(element, &b, painter, widget);
-        }
-        break;
     case CE_MenuBarEmptyArea:
         painter->save();
     {
diff -Naur a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
--- a/src/widgets/util/qsystemtrayicon.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/util/qsystemtrayicon.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -208,7 +208,7 @@
     if (oldMenu != menu && d->qpa_sys) {
         // Show the QMenu-based menu for QPA plugins that do not provide native menus
         if (oldMenu && !oldMenu->platformMenu())
-            QObject::disconnect(d->qpa_sys, &QPlatformSystemTrayIcon::contextMenuRequested, menu, nullptr);
+            QObject::disconnect(d->qpa_sys, &QPlatformSystemTrayIcon::contextMenuRequested, oldMenu, nullptr);
         if (menu && !menu->platformMenu()) {
             QObject::connect(d->qpa_sys, &QPlatformSystemTrayIcon::contextMenuRequested,
                              menu,
diff -Naur a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
--- a/src/widgets/widgets/qabstractbutton.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qabstractbutton.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -56,6 +56,7 @@
 #ifndef QT_NO_ACCESSIBILITY
 #include "qaccessible.h"
 #endif
+#include <qpa/qplatformtheme.h>
 
 #include <algorithm>
 
@@ -1076,19 +1077,19 @@
 {
     Q_D(QAbstractButton);
     bool next = true;
-    switch (e->key()) {
-    case Qt::Key_Enter:
-    case Qt::Key_Return:
-        e->ignore();
-        break;
-    case Qt::Key_Select:
-    case Qt::Key_Space:
-        if (!e->isAutoRepeat()) {
-            setDown(true);
-            repaint();
-            d->emitPressed();
-        }
-        break;
+
+    const auto key = static_cast<Qt::Key>(e->key());
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    if (buttonPressKeys.contains(key) && !e->isAutoRepeat()) {
+        setDown(true);
+        repaint();
+        d->emitPressed();
+        return;
+    }
+
+    switch (key) {
     case Qt::Key_Up:
         next = false;
         Q_FALLTHROUGH();
@@ -1153,15 +1154,15 @@
     if (!e->isAutoRepeat())
         d->repeatTimer.stop();
 
-    switch (e->key()) {
-    case Qt::Key_Select:
-    case Qt::Key_Space:
-        if (!e->isAutoRepeat() && d->down)
-            d->click();
-        break;
-    default:
-        e->ignore();
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    if (buttonPressKeys.contains(static_cast<Qt::Key>(e->key())) && !e->isAutoRepeat() && d->down) {
+        d->click();
+        return;
     }
+
+    e->ignore();
 }
 
 /*!\reimp
diff -Naur a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
--- a/src/widgets/widgets/qcombobox.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qcombobox.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -3352,7 +3352,23 @@
 
     Move move = NoMove;
     int newIndex = currentIndex();
-    switch (e->key()) {
+
+    bool pressLikeButton = !d->lineEdit;
+#ifdef QT_KEYPAD_NAVIGATION
+    pressLikeButton |= QApplicationPrivate::keypadNavigationEnabled() && !hasEditFocus();
+#endif
+    auto key = static_cast<Qt::Key>(e->key());
+    if (pressLikeButton) {
+        const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                             ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                             .value<QList<Qt::Key>>();
+        if (buttonPressKeys.contains(key)) {
+            showPopup();
+            return;
+        }
+    }
+
+    switch (key) {
     case Qt::Key_Up:
         if (e->modifiers() & Qt::ControlModifier)
             break; // pass to line edit for auto completion
@@ -3394,26 +3410,11 @@
             return;
         }
         break;
-    case Qt::Key_Space:
-        if (!d->lineEdit) {
-            showPopup();
-            return;
-        }
-        break;
-    case Qt::Key_Enter:
-    case Qt::Key_Return:
     case Qt::Key_Escape:
         if (!d->lineEdit)
             e->ignore();
         break;
 #ifdef QT_KEYPAD_NAVIGATION
-    case Qt::Key_Select:
-        if (QApplicationPrivate::keypadNavigationEnabled()
-                && (!hasEditFocus() || !d->lineEdit)) {
-            showPopup();
-            return;
-        }
-        break;
     case Qt::Key_Left:
     case Qt::Key_Right:
         if (QApplicationPrivate::keypadNavigationEnabled() && !hasEditFocus())
diff -Naur a/src/widgets/widgets/qdatetimeedit_p.h b/src/widgets/widgets/qdatetimeedit_p.h
--- a/src/widgets/widgets/qdatetimeedit_p.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qdatetimeedit_p.h	2024-05-09 16:34:52.617982808 +0200
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
 ** Contact: https://www.qt.io/licensing/
 **
 ** This file is part of the QtWidgets module of the Qt Toolkit.
diff -Naur a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
--- a/src/widgets/widgets/qdial.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qdial.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -94,6 +94,8 @@
     if (wrapping) {
         if ((val >= minimum) && (val <= maximum))
             return val;
+        if (minimum == maximum)
+            return minimum;
         val = minimum + ((val - minimum) % (maximum - minimum));
         if (val < minimum)
             val += maximum - minimum;
diff -Naur a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
--- a/src/widgets/widgets/qgroupbox.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qgroupbox.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -54,6 +54,8 @@
 #include "qaccessible.h"
 #endif
 #include <private/qwidget_p.h>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformtheme.h>
 
 #include "qdebug.h"
 
@@ -360,7 +362,10 @@
         return true;
     case QEvent::KeyPress: {
         QKeyEvent *k = static_cast<QKeyEvent*>(e);
-        if (!k->isAutoRepeat() && (k->key() == Qt::Key_Select || k->key() == Qt::Key_Space)) {
+        const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                             ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                             .value<QList<Qt::Key>>();
+        if (!k->isAutoRepeat() && buttonPressKeys.contains(static_cast<Qt::Key>(k->key()))) {
             d->pressedControl = QStyle::SC_GroupBoxCheckBox;
             update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
             return true;
@@ -369,7 +374,10 @@
     }
     case QEvent::KeyRelease: {
         QKeyEvent *k = static_cast<QKeyEvent*>(e);
-        if (!k->isAutoRepeat() && (k->key() == Qt::Key_Select || k->key() == Qt::Key_Space)) {
+        const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                             ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                             .value<QList<Qt::Key>>();
+        if (!k->isAutoRepeat() && buttonPressKeys.contains(static_cast<Qt::Key>(k->key()))) {
             bool toggle = (d->pressedControl == QStyle::SC_GroupBoxLabel
                            || d->pressedControl == QStyle::SC_GroupBoxCheckBox);
             d->pressedControl = QStyle::SC_None;
diff -Naur a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
--- a/src/widgets/widgets/qtabbar.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qtabbar.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -2190,7 +2190,8 @@
                 }
             }
             // Buttons needs to follow the dragged tab
-            d->layoutTab(d->pressedIndex);
+            if (d->pressedIndex != -1)
+                d->layoutTab(d->pressedIndex);
 
             update();
         }
diff -Naur a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
--- a/src/widgets/widgets/qtoolbutton.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qtoolbutton.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -982,7 +982,15 @@
     return d->defaultAction;
 }
 
-
+/*!
+  \reimp
+ */
+void QToolButton::checkStateSet()
+{
+    Q_D(QToolButton);
+    if (d->defaultAction && d->defaultAction->isCheckable())
+        d->defaultAction->setChecked(isChecked());
+}
 
 /*!
   \reimp
diff -Naur a/src/widgets/widgets/qtoolbutton.h b/src/widgets/widgets/qtoolbutton.h
--- a/src/widgets/widgets/qtoolbutton.h	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qtoolbutton.h	2024-05-09 16:34:52.617982808 +0200
@@ -118,6 +118,7 @@
     void changeEvent(QEvent *) override;
 
     bool hitButton(const QPoint &pos) const override;
+    void checkStateSet() override;
     void nextCheckState() override;
     void initStyleOption(QStyleOptionToolButton *option) const;
 
diff -Naur a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
--- a/src/widgets/widgets/qwidgettextcontrol.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp	2024-05-09 16:34:52.617982808 +0200
@@ -2057,6 +2057,11 @@
             || e->preeditString() != cursor.block().layout()->preeditAreaText()
             || e->replacementLength() > 0;
 
+    if (!isGettingInput && e->attributes().isEmpty()) {
+        e->ignore();
+        return;
+    }
+
     int oldCursorPos = cursor.position();
 
     cursor.beginEditBlock();
diff -Naur a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
--- a/src/xml/sax/qxml.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/src/xml/sax/qxml.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -7464,7 +7464,12 @@
             case DoneD:
                 tmp = ref().toUInt(&ok, 10);
                 if (ok) {
-                    stringAddC(QChar(tmp));
+                    if (tmp > 0xffff) {
+                        stringAddC(QChar::highSurrogate(tmp));
+                        stringAddC(QChar::lowSurrogate(tmp));
+                    } else {
+                        stringAddC(QChar(tmp));
+                    }
                 } else {
                     reportParseError(QLatin1String(XMLERR_ERRORPARSINGREFERENCE));
                     return false;
@@ -7475,7 +7480,12 @@
             case DoneH:
                 tmp = ref().toUInt(&ok, 16);
                 if (ok) {
-                    stringAddC(QChar(tmp));
+                    if (tmp > 0xffff) {
+                        stringAddC(QChar::highSurrogate(tmp));
+                        stringAddC(QChar::lowSurrogate(tmp));
+                    } else {
+                        stringAddC(QChar(tmp));
+                    }
                 } else {
                     reportParseError(QLatin1String(XMLERR_ERRORPARSINGREFERENCE));
                     return false;
diff -Naur a/sync.profile b/sync.profile
--- a/sync.profile	2023-10-17 14:50:53.000000000 +0200
+++ b/sync.profile	2024-05-09 16:34:52.621316163 +0200
@@ -77,7 +77,7 @@
         "qsql.h" => "QtSql/qtsqlglobal.h"
     },
     "QtDBus" => {
-        "qdbusmacros.h" => "QtDbus/qtdbusglobal.h"
+        "qdbusmacros.h" => "QtDBus/qtdbusglobal.h"
     },
     "QtTest" => {
         "qtest_global.h" => "QtTest/qttestglobal.h"
diff -Naur a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp
--- a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -117,6 +117,7 @@
     void shouldPropagateDropAfterLastRow_data();
     void shouldPropagateDropAfterLastRow();
     void qtbug91788();
+    void qtbug91878();
 
 private:
     QStandardItemModel mod;
@@ -843,6 +844,22 @@
     QCOMPARE(proxyConcat.columnCount(), 0);
 }
 
+void tst_QConcatenateTablesProxyModel::qtbug91878()
+{
+    QStandardItemModel m;
+    m.setRowCount(4);
+    m.setColumnCount(4);
+
+    QConcatenateTablesProxyModel pm;
+    QSortFilterProxyModel proxyFilter;
+    proxyFilter.setSourceModel(&pm);
+    proxyFilter.setFilterFixedString("something");
+    pm.addSourceModel(&m);  // This should not assert
+
+    QCOMPARE(pm.columnCount(), 4);
+    QCOMPARE(pm.rowCount(), 4);
+}
+
 QTEST_GUILESS_MAIN(tst_QConcatenateTablesProxyModel)
 
 #include "tst_qconcatenatetablesproxymodel.moc"
diff -Naur a/tests/auto/corelib/mimetypes/qmimedatabase/circular-inheritance.xml b/tests/auto/corelib/mimetypes/qmimedatabase/circular-inheritance.xml
--- a/tests/auto/corelib/mimetypes/qmimedatabase/circular-inheritance.xml	1970-01-01 01:00:00.000000000 +0100
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/circular-inheritance.xml	2024-05-09 16:34:52.621316163 +0200
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="application/ecmascript">
+    <comment>It's more accurate to say that ECMAScript is a subset of JavaScript</comment>
+    <sub-class-of type="text/javascript"/>
+    <glob pattern="*.js"/>
+  </mime-type>
+  <mime-type type="text/javascript">
+    <comment>than to say that JavaScript is a subset of ECMAScript</comment>
+    <sub-class-of type="application/ecmascript"/>
+    <glob pattern="*.js"/>
+  </mime-type>
+</mime-info>
diff -Naur a/tests/auto/corelib/mimetypes/qmimedatabase/testdata.qrc b/tests/auto/corelib/mimetypes/qmimedatabase/testdata.qrc
--- a/tests/auto/corelib/mimetypes/qmimedatabase/testdata.qrc	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/testdata.qrc	2024-05-09 16:34:52.621316163 +0200
@@ -3,10 +3,12 @@
         <file alias="yast2-metapackage-handler-mimetypes.xml">yast2-metapackage-handler-mimetypes.xml</file>
         <file alias="qml-again.xml">qml-again.xml</file>
         <file alias="text-x-objcsrc.xml">text-x-objcsrc.xml</file>
+        <file alias="text-plain-subclass.xml">text-plain-subclass.xml</file>
         <file alias="test.qml">test.qml</file>
         <file>invalid-magic1.xml</file>
         <file>invalid-magic2.xml</file>
         <file>invalid-magic3.xml</file>
+        <file>circular-inheritance.xml</file>
         <file>magic-and-hierarchy.xml</file>
         <file>magic-and-hierarchy.foo</file>
         <file>magic-and-hierarchy2.foo</file>
diff -Naur a/tests/auto/corelib/mimetypes/qmimedatabase/text-plain-subclass.xml b/tests/auto/corelib/mimetypes/qmimedatabase/text-plain-subclass.xml
--- a/tests/auto/corelib/mimetypes/qmimedatabase/text-plain-subclass.xml	1970-01-01 01:00:00.000000000 +0100
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/text-plain-subclass.xml	2024-05-09 16:34:52.621316163 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+    <mime-type type="text/x-microdvd">
+        <comment>MicroDVD subtitles</comment>
+        <sub-class-of type="text/plain"/>
+        <magic priority="50">
+            <match type="string" value="{1}" offset="0"/>
+            <match type="string" value="{0}" offset="0"/>
+            <match type="string" value="}{" offset="0:6"/>
+        </magic>
+        <generic-icon name="text-x-generic"/>
+        <glob pattern="*.sub"/>
+        <glob pattern="*.txt"/>
+    </mime-type>
+</mime-info>
diff -Naur a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -49,10 +49,12 @@
     "yast2-metapackage-handler-mimetypes.xml",
     "qml-again.xml",
     "text-x-objcsrc.xml",
+    "text-plain-subclass.xml",
     "invalid-magic1.xml",
     "invalid-magic2.xml",
     "invalid-magic3.xml",
     "magic-and-hierarchy.xml",
+    "circular-inheritance.xml",
     0
 };
 
@@ -70,15 +72,15 @@
 
     QString result;
     QTextStream str(&result);
-    str << "\nCannot find the shared-mime-info test suite\nstarting from: "
+    str << "\nCannot find the shared-mime-info test suite\nin the parent of: "
         << QDir::toNativeSeparators(QDir::currentPath()) << "\n"
            "cd " << QDir::toNativeSeparators(QStringLiteral("tests/auto/corelib/mimetypes/qmimedatabase")) << "\n"
-           "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-10.zip\n"
-           "unzip Release-1-10.zip\n";
+           "wget https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/2.1/shared-mime-info-2.1.zip\n"
+           "unzip shared-mime-info-2.1.zip\n";
 #ifdef Q_OS_WIN
-    str << "mkdir testfiles\nxcopy /s Release-1-10 s-m-i\n";
+    str << "mkdir testfiles\nxcopy /s shared-mime-info-2.1 s-m-i\n";
 #else
-    str << "ln -s Release-1-10 s-m-i\n";
+    str << "ln -s shared-mime-info-2.1 s-m-i\n";
 #endif
     return result;
 }
@@ -154,7 +156,7 @@
     QVERIFY2(copyResourceFile(xmlFileName, xmlTargetFileName, &errorMessage), qPrintable(errorMessage));
 #endif
 
-    m_testSuite = QFINDTESTDATA("s-m-i/tests");
+    m_testSuite = QFINDTESTDATA("s-m-i/tests/mime-detection");
     if (m_testSuite.isEmpty())
         qWarning("%s", qPrintable(testSuiteWarning()));
 
@@ -390,6 +392,13 @@
     const QMimeType mswordTemplate = db.mimeTypeForName(QString::fromLatin1("application/msword-template"));
     QVERIFY(mswordTemplate.isValid());
     QVERIFY(mswordTemplate.inherits(QLatin1String("application/msword")));
+
+    // Check that buggy type definitions that have circular inheritance don't cause an infinite
+    // loop, especially when resolving a conflict between the file's name and its contents
+    const QMimeType ecmascript = db.mimeTypeForName(QString::fromLatin1("application/ecmascript"));
+    QVERIFY(ecmascript.allAncestors().contains("text/plain"));
+    const QMimeType javascript = db.mimeTypeForFileNameAndData("xml.js", "<?xml?>");
+    QVERIFY(javascript.inherits(QString::fromLatin1("text/javascript")));
 }
 
 void tst_QMimeDatabase::aliases()
@@ -611,7 +620,7 @@
     QVERIFY(!lst.isEmpty());
 
     // Hardcoding this is the only way to check both providers find the same number of mimetypes.
-    QCOMPARE(lst.count(), 779);
+    QCOMPARE(lst.count(), 811);
 
     foreach (const QMimeType &mime, lst) {
         const QString name = mime.name();
@@ -631,10 +640,9 @@
 
     QTest::newRow("mimetype with a single pattern") << "application/pdf" << "*.pdf" << "pdf";
     QTest::newRow("mimetype with multiple patterns") << "application/x-kpresenter" << "*.kpr;*.kpt" << "kpr";
-    QTest::newRow("jpeg") << "image/jpeg" << "*.jpe;*.jpg;*.jpeg" << "jpeg";
-    //if (KMimeType::sharedMimeInfoVersion() > KDE_MAKE_VERSION(0, 60, 0)) {
-        QTest::newRow("mimetype with many patterns") << "application/vnd.wordperfect" << "*.wp;*.wp4;*.wp5;*.wp6;*.wpd;*.wpp" << "wp";
-    //}
+    // The preferred suffix for image/jpeg is *.jpg, as per https://bugs.kde.org/show_bug.cgi?id=176737
+    QTest::newRow("jpeg") << "image/jpeg" << "*.jpe;*.jpg;*.jpeg" << "jpg";
+    QTest::newRow("mimetype with many patterns") << "application/vnd.wordperfect" << "*.wp;*.wp4;*.wp5;*.wp6;*.wpd;*.wpp" << "wp";
     QTest::newRow("oasis text mimetype") << "application/vnd.oasis.opendocument.text" << "*.odt" << "odt";
     QTest::newRow("oasis presentation mimetype") << "application/vnd.oasis.opendocument.presentation" << "*.odp" << "odp";
     QTest::newRow("mimetype with multiple patterns") << "text/plain" << "*.asc;*.txt;*,v" << "txt";
@@ -1070,6 +1078,8 @@
         QVERIFY(objcsrc.isValid());
         QCOMPARE(objcsrc.globPatterns(), QStringList());
     }
+    QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.txt"), QMimeDatabase::MatchExtension).name(),
+             QString::fromLatin1("text/plain"));
 
     // Test that a double-definition of a mimetype doesn't lead to sniffing ("conflicting globs").
     const QString qmlTestFile = QLatin1String(RESOURCE_PREFIX "test.qml");
diff -Naur a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h	2024-05-09 16:34:52.621316163 +0200
@@ -35,7 +35,7 @@
 class Plugin1 : public QObject, public PluginInterface1
 {
     Q_OBJECT
-    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.autotests.plugininterface1")
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.autotests.plugininterface1" FILE "plugin1.json")
     Q_INTERFACES(PluginInterface1)
 
 public:
diff -Naur a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.json b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.json
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.json	1970-01-01 01:00:00.000000000 +0100
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.json	2024-05-09 16:34:52.621316163 +0200
@@ -0,0 +1,5 @@
+{
+    "Keys": [
+        "plugin1"
+    ]
+}
diff -Naur a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
--- a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -31,6 +31,7 @@
 #include <QtCore/qfileinfo.h>
 #include <QtCore/qplugin.h>
 #include <private/qfactoryloader_p.h>
+#include <private/qlibrary_p.h>
 #include "plugin1/plugininterface1.h"
 #include "plugin2/plugininterface2.h"
 
@@ -52,6 +53,7 @@
 
 private slots:
     void usingTwoFactoriesFromSameDir();
+    void multiplePaths();
 };
 
 static const char binFolderC[] = "bin";
@@ -92,5 +94,30 @@
     QCOMPARE(plugin2->pluginName(), QLatin1String("Plugin2 ok"));
 }
 
+void tst_QFactoryLoader::multiplePaths()
+{
+#if !QT_CONFIG(library) || !(defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)) || defined(Q_OS_ANDROID)
+    QSKIP("Test not applicable in this configuration.");
+#else
+    const QString binFolder = QFINDTESTDATA(binFolderC);
+    
+    QTemporaryDir dir;
+    QVERIFY(dir.isValid());
+
+    QString pluginsPath = QFileInfo(binFolder, binFolderC).absolutePath();
+    QString linkPath = dir.filePath(binFolderC);
+    QVERIFY(QFile::link(pluginsPath, linkPath));
+
+    QCoreApplication::setLibraryPaths({ QFileInfo(binFolder).absolutePath(), dir.path() });
+
+    const QString suffix = QLatin1Char('/') + QLatin1String(binFolderC);
+    QFactoryLoader loader1(PluginInterface1_iid, suffix);
+
+    QLibraryPrivate *library1 = loader1.library("plugin1");
+    QVERIFY(library1);
+    QCOMPARE(library1->loadHints(), QLibrary::PreventUnloadHint);
+#endif
+}
+
 QTEST_MAIN(tst_QFactoryLoader)
 #include "tst_qfactoryloader.moc"
diff -Naur a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -193,7 +193,9 @@
     QVERIFY(!unloaded);
     }
 
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_HPUX)
+// A bug in QNX causes the test to crash on exit after attempting to load
+// a shared library with undefined symbols (tracked as QTBUG-114682).
+#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_HPUX) && !defined(Q_OS_QNX)
     {
     QPluginLoader loader( sys_qualifiedLibraryName("almostplugin"));     //a plugin with unresolved symbols
     loader.setLoadHints(QLibrary::ResolveAllSymbolsHint);
@@ -243,10 +245,37 @@
     QSKIP("This test requires Qt to create shared libraries.");
 #endif
     QPluginLoader loader;
-    QCOMPARE(loader.loadHints(), QLibrary::LoadHints{});   //Do not crash
+    QCOMPARE(loader.loadHints(), QLibrary::PreventUnloadHint);   //Do not crash
     loader.setLoadHints(QLibrary::ResolveAllSymbolsHint);
+    QCOMPARE(loader.loadHints(), QLibrary::ResolveAllSymbolsHint);
+    // We can clear load hints when file name is not set.
+    loader.setLoadHints(QLibrary::LoadHints{});
+    QCOMPARE(loader.loadHints(), QLibrary::LoadHints{});
+    // Set the hints again
+    loader.setLoadHints(QLibrary::ResolveAllSymbolsHint);
+    QCOMPARE(loader.loadHints(), QLibrary::ResolveAllSymbolsHint);
     loader.setFileName( sys_qualifiedLibraryName("theplugin"));     //a plugin
     QCOMPARE(loader.loadHints(), QLibrary::ResolveAllSymbolsHint);
+
+    QPluginLoader loader4;
+    QCOMPARE(loader4.loadHints(), QLibrary::PreventUnloadHint);
+    loader4.setLoadHints(QLibrary::LoadHints{});
+    QCOMPARE(loader4.loadHints(), QLibrary::LoadHints{});
+    loader4.setFileName(sys_qualifiedLibraryName("theplugin"));
+    // Hints are merged with hints from the previous loader.
+    QCOMPARE(loader4.loadHints(), QLibrary::ResolveAllSymbolsHint);
+    // We cannot clear load hints after associating the loader with a file.
+    loader.setLoadHints(QLibrary::LoadHints{});
+    QCOMPARE(loader.loadHints(), QLibrary::ResolveAllSymbolsHint);
+
+    QPluginLoader loader2;
+    QCOMPARE(loader2.loadHints(), QLibrary::PreventUnloadHint);
+    loader2.setFileName(sys_qualifiedLibraryName("theplugin"));
+    // Hints are merged with hints from previous loaders.
+    QCOMPARE(loader2.loadHints(), QLibrary::PreventUnloadHint | QLibrary::ResolveAllSymbolsHint);
+
+    QPluginLoader loader3(sys_qualifiedLibraryName("theplugin"));
+    QCOMPARE(loader3.loadHints(), QLibrary::PreventUnloadHint | QLibrary::ResolveAllSymbolsHint);
 }
 
 void tst_QPluginLoader::deleteinstanceOnUnload()
diff -Naur a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
--- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -75,6 +75,7 @@
     void arrayStringElements();
     void arraySelfAssign_data() { basics_data(); }
     void arraySelfAssign();
+    void arrayNested();
 
     void mapDefaultInitialization();
     void mapEmptyInitializerList();
@@ -93,6 +94,7 @@
     void mapSelfAssign();
     void mapComplexKeys_data() { basics_data(); }
     void mapComplexKeys();
+    void mapNested();
 
     void sorting();
 
@@ -1570,6 +1572,91 @@
     QVERIFY(!m.contains(tagged));
 }
 
+void tst_QCborValue::arrayNested()
+{
+    const QCborArray wrongArray = { false, nullptr, QCborValue() };
+    {
+        QCborArray a1 = { 42, 47 };
+        QCborArray a2 = { QCborValue(a1) };
+        QCOMPARE(a2.size(), 1);
+        const QCborValue &first = qAsConst(a2).first();
+        QVERIFY(first.isArray());
+        QCOMPARE(first.toArray(wrongArray).size(), 2);
+        QCOMPARE(first.toArray(wrongArray).first(), 42);
+        QCOMPARE(first.toArray(wrongArray).last(), 47);
+    }
+    {
+        QCborArray a1 = { 42, 47 };
+        QCborArray a2 = { QCborValue(a1) };
+        QCOMPARE(a2.size(), 1);
+        QCborValueRef first = a2.first();
+        QVERIFY(first.isArray());
+        QCOMPARE(first.toArray(wrongArray).size(), 2);
+        QCOMPARE(first.toArray(wrongArray).first(), 42);
+        QCOMPARE(first.toArray(wrongArray).last(), 47);
+    }
+
+    {
+        QCborArray a1;
+        a1 = { QCborValue(a1) };        // insert it into itself
+        QCOMPARE(a1.size(), 1);
+        const QCborValue &first = qAsConst(a1).first();
+        QVERIFY(first.isArray());
+        QCOMPARE(first, QCborArray());
+        QCOMPARE(first.toArray(wrongArray), QCborArray());
+    }
+    {
+        QCborArray a1;
+        a1 = { QCborValue(a1) };        // insert it into itself
+        QCborValueRef first = a1.first();
+        QVERIFY(first.isArray());
+        QCOMPARE(first, QCborArray());
+        QCOMPARE(first.toArray(wrongArray), QCborArray());
+    }
+    {
+        QCborArray a1;
+        a1.append(a1);                  // insert into itself
+        QCOMPARE(a1.size(), 1);
+        const QCborValue &first = qAsConst(a1).first();
+        QVERIFY(first.isArray());
+        QCOMPARE(first, QCborArray());
+        QCOMPARE(first.toArray(), QCborArray());
+    }
+    {
+        QCborArray a1;
+        a1.append(a1);                  // insert into itself
+        QCborValueRef first = a1.first();
+        QVERIFY(first.isArray());
+        QCOMPARE(first, QCborArray());
+        QCOMPARE(first.toArray(), QCborArray());
+    }
+}
+
+void tst_QCborValue::mapNested()
+{
+    const QCborMap wrongMap = { { -1, false }, {-2, nullptr }, { -3, QCborValue() } };
+    {
+        QCborMap m1 = { {1, 42}, {2, 47} };
+        QCborMap m2 = { { QString(), m1 } };
+        QCOMPARE(m2.size(), 1);
+        const QCborValue &first = m2.constBegin().value();
+        QVERIFY(first.isMap());
+        QCOMPARE(first.toMap(wrongMap).size(), 2);
+        QCOMPARE(first.toMap(wrongMap).begin().key(), 1);
+        QCOMPARE(first.toMap(wrongMap).begin().value(), 42);
+    }
+
+    {
+        QCborMap m1;
+        m1 = { { QString(), QCborValue(m1) } };         // insert it into itself
+        QCOMPARE(m1.size(), 1);
+        const QCborValue &first = m1.constBegin().value();
+        QVERIFY(first.isMap());
+        QCOMPARE(first, QCborMap());
+        QCOMPARE(first.toMap(wrongMap), QCborMap());
+    }
+}
+
 void tst_QCborValue::sorting()
 {
     QCborValue vundef, vnull(nullptr);
diff -Naur a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -42,6 +42,7 @@
 
 #include "qc14n.h"
 
+Q_DECLARE_METATYPE(QXmlStreamReader::Error)
 Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour)
 
 static const char *const catalogFile = "XML-Test-Suite/xmlconf/finalCatalog.xml";
@@ -587,6 +588,8 @@
     void readBack() const;
     void roundTrip() const;
     void roundTrip_data() const;
+    void test_fastScanName_data() const;
+    void test_fastScanName() const;
 
     void entityExpansionLimit() const;
 
@@ -1842,5 +1845,42 @@
     QCOMPARE(out, in);
 }
 
+void tst_QXmlStream::test_fastScanName_data() const
+{
+    QTest::addColumn<QByteArray>("data");
+    QTest::addColumn<QXmlStreamReader::Error>("errorType");
+
+    // 4096 is the limit in QXmlStreamReaderPrivate::fastScanName()
+
+    QByteArray arr = "<a:" + QByteArray("b").repeated(4096 - 1);
+    QTest::newRow("data1") << arr << QXmlStreamReader::PrematureEndOfDocumentError;
+
+    arr = "<a:" + QByteArray("b").repeated(4096);
+    QTest::newRow("data2") << arr << QXmlStreamReader::NotWellFormedError;
+
+    arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96);
+    QTest::newRow("data3") << arr << QXmlStreamReader::PrematureEndOfDocumentError;
+
+    arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96 + 1);
+    QTest::newRow("data4") << arr << QXmlStreamReader::NotWellFormedError;
+
+    arr = "<" + QByteArray("a").repeated(4000 + 1) + ":" + QByteArray("b").repeated(96);
+    QTest::newRow("data5") << arr << QXmlStreamReader::NotWellFormedError;
+}
+
+void tst_QXmlStream::test_fastScanName() const
+{
+    QFETCH(QByteArray, data);
+    QFETCH(QXmlStreamReader::Error, errorType);
+
+    QXmlStreamReader reader(data);
+    QXmlStreamReader::TokenType tokenType;
+    while (!reader.atEnd())
+        tokenType = reader.readNext();
+
+    QCOMPARE(tokenType, QXmlStreamReader::Invalid);
+    QCOMPARE(reader.error(), errorType);
+}
+
 #include "tst_qxmlstream.moc"
 // vim: et:ts=4:sw=4:sts=4
diff -Naur a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp
--- a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -65,6 +65,7 @@
     void isValidId_data();
     void isValidId();
     void malformed();
+    void serialize();
     // Backend tests
     void utcTest();
     void icuTest();
@@ -951,6 +952,33 @@
         barf.offsetFromUtc(now);
 }
 
+void tst_QTimeZone::serialize()
+{
+    int parts = 0;
+#ifndef QT_NO_DEBUG_STREAM
+    qDebug() << QTimeZone(); // to verify no crash
+    parts++;
+#endif
+#ifndef QT_NO_DATASTREAM
+    QByteArray blob;
+    {
+        QDataStream stream(&blob, QIODevice::WriteOnly);
+        stream << QTimeZone("Europe/Oslo") << QTimeZone(420) << QTimeZone() << qint64(-1);
+    }
+    QDataStream stream(&blob, QIODevice::ReadOnly);
+    QTimeZone invalid, offset, oslo;
+    qint64 minusone;
+    stream >> oslo >> offset >> invalid >> minusone;
+    QCOMPARE(oslo, QTimeZone("Europe/Oslo"));
+    QCOMPARE(offset, QTimeZone(420));
+    QVERIFY(!invalid.isValid());
+    QCOMPARE(minusone, qint64(-1));
+    parts++;
+#endif
+    if (!parts)
+        QSKIP("No serialization enabled");
+}
+
 void tst_QTimeZone::utcTest()
 {
 #ifdef QT_BUILD_INTERNAL
diff -Naur a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -507,6 +507,10 @@
     QTest::newRow("Ctrl+Alt+Num+Del") << QKeySequence(Qt::ControlModifier | Qt::AltModifier | Qt::KeypadModifier | Qt::Key_Delete) << "Ctrl+Alt+Num+Del";
     QTest::newRow("Ctrl+Ins") << QKeySequence(Qt::ControlModifier | Qt::Key_Insert) << "Ctrl+Ins";
     QTest::newRow("Ctrl+Num+Ins(1)") << QKeySequence(Qt::Key_Insert | Qt::KeypadModifier | Qt::ControlModifier) << "Ctrl+Num+Ins";
+    QTest::newRow("Ctrl") << QKeySequence(Qt::Key_Control) << "Control";
+    QTest::newRow("Alt") << QKeySequence(Qt::Key_Alt) << "Alt";
+    QTest::newRow("Shift") << QKeySequence(Qt::Key_Shift) << "Shift";
+    QTest::newRow("Meta") << QKeySequence(Qt::Key_Meta) << "Meta";
 }
 
 void tst_QKeySequence::toStringFromKeycode()
diff -Naur a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -81,6 +81,8 @@
     void registerOpenTypePreferredNamesSystem();
     void registerOpenTypePreferredNamesApplication();
 
+    void stretchRespected();
+
 private:
     QString m_ledFont;
     QString m_testFont;
@@ -355,6 +357,28 @@
     return QStringLiteral("foo bar");
 }
 
+void tst_QFontDatabase::stretchRespected()
+{
+    int italicId = QFontDatabase::addApplicationFont(m_testFontItalic);
+    QVERIFY(italicId != -1);
+
+    QVERIFY(!QFontDatabase::applicationFontFamilies(italicId).isEmpty());
+
+    QString italicFontName = QFontDatabase::applicationFontFamilies(italicId).first();
+
+    QFont italicFont = QFontDatabase().font(italicFontName,
+                                            QString::fromLatin1("Italic"), 14);
+    QVERIFY(italicFont.italic());
+
+    QFont italicStretchedFont = italicFont;
+    italicStretchedFont.setStretch( 400 );
+
+    QVERIFY(QFontMetricsF(italicFont).horizontalAdvance(QStringLiteral("foobar")) <
+            QFontMetricsF(italicStretchedFont).horizontalAdvance(QStringLiteral("foobar")));
+
+    QFontDatabase::removeApplicationFont(italicId);
+}
+
 void tst_QFontDatabase::condensedFontWidthNoFontMerging()
 {
     int regularFontId = QFontDatabase::addApplicationFont(m_testFont);
diff -Naur a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp
--- a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -179,6 +179,7 @@
     QVERIFY(!address.isEmpty());
 
     m_window = new AccessibleTestWindow();
+    m_window->setObjectName("mainWindow"_L1);
     m_window->show();
 
     QVERIFY(QTest::qWaitForWindowExposed(m_window));
@@ -236,8 +237,11 @@
 void tst_QAccessibilityLinux::testLabel()
 {
     QLabel *l = new QLabel(m_window);
+    l->setObjectName("theObjectName"_L1);
     l->setText("Hello A11y");
     m_window->addWidget(l);
+    auto a11yEmpty = new QLabel(m_window);
+    m_window->addWidget(l);
 
     // Application
     QCOMPARE(getParent(mainWindow), QLatin1String(ATSPI_DBUS_PATH_ROOT));
@@ -249,6 +253,8 @@
     QCOMPARE(getChildren(labelInterface).count(), 0);
     QCOMPARE(labelInterface->call(QDBus::Block, "GetRoleName").arguments().first().toString(), QLatin1String("label"));
     QCOMPARE(labelInterface->call(QDBus::Block, "GetRole").arguments().first().toUInt(), 29u);
+    QCOMPARE(labelInterface->call(QDBus::Block, "GetAccessibleId").arguments().first().toString(),
+             QLatin1String("mainWindow.theObjectName"));
     QCOMPARE(getParent(labelInterface), mainWindow->path());
     QVERIFY(!hasState(labelInterface, ATSPI_STATE_EDITABLE));
     QVERIFY(hasState(labelInterface, ATSPI_STATE_READ_ONLY));
@@ -256,7 +262,12 @@
     l->setText("New text");
     QCOMPARE(labelInterface->property("Name").toString(), l->text());
 
+    auto *a11yEmptyInterface = getInterface(children.at(1), "org.a11y.atspi.Accessible");
+    QCOMPARE(a11yEmptyInterface->call(QDBus::Block, "GetAccessibleId").arguments().first().toString(),
+             QLatin1String("mainWindow.QLabel"));
+
     m_window->clearChildren();
+    delete a11yEmptyInterface;
     delete labelInterface;
 }
 
diff -Naur a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
--- a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -115,6 +115,10 @@
     // QTBUG-92886
     model.insertRows(0, 5);
     model.removeRows(1, 2);
+
+    const QModelIndex parentIndex = model.index(0, 0);
+    model.insertRows(0, 5, parentIndex);
+    model.removeRows(1, 2, parentIndex);
 }
 
 void tst_QAbstractItemModelTester::testInsertThroughProxy()
diff -Naur a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json
--- a/tests/auto/tools/moc/allmocs_baseline_in.json	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/tools/moc/allmocs_baseline_in.json	2024-05-09 16:34:52.621316163 +0200
@@ -671,40 +671,6 @@
     {
         "classes": [
             {
-                "className": "InlineSlotsWithThrowDeclaration",
-                "object": true,
-                "qualifiedClassName": "InlineSlotsWithThrowDeclaration",
-                "slots": [
-                    {
-                        "access": "public",
-                        "name": "a",
-                        "returnType": "void"
-                    },
-                    {
-                        "access": "public",
-                        "name": "b",
-                        "returnType": "void"
-                    },
-                    {
-                        "access": "public",
-                        "name": "c",
-                        "returnType": "void"
-                    }
-                ],
-                "superClasses": [
-                    {
-                        "access": "public",
-                        "name": "QObject"
-                    }
-                ]
-            }
-        ],
-        "inputFile": "task189996.h",
-        "outputRevision": 67
-    },
-    {
-        "classes": [
-            {
                 "className": "TestObject",
                 "object": true,
                 "qualifiedClassName": "NS_A::NS_B::TestObject",
diff -Naur a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro
--- a/tests/auto/tools/moc/moc.pro	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/tools/moc/moc.pro	2024-05-09 16:34:52.621316163 +0200
@@ -15,7 +15,7 @@
 HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-newlines.h oldstyle-casts.h \
            slots-with-void-template.h qinvokable.h namespaced-flags.h trigraphs.h \
            escapes-in-string-literals.h cstyle-enums.h qprivateslots.h gadgetwithnoenums.h \
-           dir-in-include-path.h single_function_keyword.h task192552.h task189996.h \
+           dir-in-include-path.h single_function_keyword.h task192552.h \
            task234909.h task240368.h pure-virtual-signals.h cxx11-enums.h \
            cxx11-final-classes.h \
            cxx11-explicit-override-control.h \
diff -Naur a/tests/auto/tools/moc/task189996.h b/tests/auto/tools/moc/task189996.h
--- a/tests/auto/tools/moc/task189996.h	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/tools/moc/task189996.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-// inline functions can have throw declarations
-
-#ifndef TASK189996_H
-#define TASK189996_H
-
-#include <QObject>
-
-class InlineSlotsWithThrowDeclaration : public QObject
-{
-    Q_OBJECT
-
-public slots:
-    void a() noexcept { }
-    void b() const noexcept { }
-    void c() noexcept;
-};
-
-#endif
diff -Naur a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
--- a/tests/auto/tools/moc/tst_moc.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/tools/moc/tst_moc.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -671,7 +671,6 @@
     void templateGtGt();
     void qprivateslots();
     void qprivateproperties();
-    void inlineSlotsWithThrowDeclaration();
     void warnOnPropertyWithoutREAD();
     void constructors();
     void typenameWithUnsigned();
@@ -816,7 +815,7 @@
 
     QStringList args;
     args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "."
-         << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-";
+         << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-";
     proc.start("gcc", args);
     QVERIFY(proc.waitForStarted());
     proc.write(mocOut);
@@ -886,7 +885,7 @@
 
     QStringList args;
     args << "-c" << "-x" << "c++" << "-I" << ".."
-         << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-";
+         << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-";
     proc.start("gcc", args);
     QVERIFY(proc.waitForStarted());
     proc.write(mocOut);
@@ -1166,7 +1165,7 @@
     QStringList gccArgs;
     gccArgs << "-c" << "-x" << "c++" << "-I" << ".."
          << "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null"
-         << "-fPIC" << "-std=c++11" <<  "-";
+         << "-fPIC" << "-std=c++1z" <<  "-";
     proc.start("gcc", gccArgs);
     QVERIFY(proc.waitForStarted());
     proc.write(mocOut);
@@ -1585,19 +1584,6 @@
 
 }
 
-#include "task189996.h"
-
-void InlineSlotsWithThrowDeclaration::c() noexcept {}
-
-void tst_Moc::inlineSlotsWithThrowDeclaration()
-{
-    InlineSlotsWithThrowDeclaration tst;
-    const QMetaObject *mobj = tst.metaObject();
-    QVERIFY(mobj->indexOfSlot("a()") != -1);
-    QVERIFY(mobj->indexOfSlot("b()") != -1);
-    QVERIFY(mobj->indexOfSlot("c()") != -1);
-}
-
 void tst_Moc::warnOnPropertyWithoutREAD()
 {
 #ifdef MOC_CROSS_COMPILED
@@ -1859,7 +1845,7 @@
 
     QStringList args;
     args << "-c" << "-x" << "c++" << "-I" << "."
-         << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-";
+         << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-";
     proc.start("gcc", args);
     QVERIFY(proc.waitForStarted());
     proc.write(mocOut);
diff -Naur a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -397,6 +397,7 @@
     void checkHeaderMinSize();
 
     void resizeToContents();
+    void resizeToContentsSpans();
 
     void tabFocus();
     void bigModel();
@@ -3721,6 +3722,70 @@
 
 }
 
+
+class SpanModel : public QAbstractTableModel
+{
+public:
+    SpanModel(bool sectionsMoved)
+        : _sectionsMoved(sectionsMoved)
+    {}
+    int columnCount(const QModelIndex & = {}) const override { return 2; }
+    int rowCount(const QModelIndex & = {}) const override { return 1; }
+    QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const override
+    {
+        if (role != Qt::DisplayRole)
+            return QVariant();
+        const int col = _sectionsMoved ? 1 - idx.column() : idx.column();
+        if (col == 0)
+            return "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
+        return QVariant();
+    }
+private:
+    bool _sectionsMoved;
+};
+
+
+void tst_QTableView::resizeToContentsSpans()
+{
+    SpanModel model1(false);
+    SpanModel model2(true);
+    QTableView view1, view2, view3;
+    view1.setModel(&model1);
+    view2.setModel(&model2);
+    view2.horizontalHeader()->moveSection(0, 1);
+    view3.setModel(&model1);
+
+    view1.setSpan(0, 0, 1, 2);
+    view2.setSpan(0, 1, 1, 2);
+    view1.show();
+    view2.show();
+    view3.show();
+    QVERIFY(QTest::qWaitForWindowExposed(&view1));
+    QVERIFY(QTest::qWaitForWindowExposed(&view2));
+    QVERIFY(QTest::qWaitForWindowExposed(&view3));
+    view1.setColumnWidth(0, 100);
+    view1.setColumnWidth(1, 100);
+    view2.setColumnWidth(0, 100);
+    view2.setColumnWidth(1, 100);
+    view3.setColumnWidth(0, 200);
+
+    view1.resizeRowToContents(0);
+    view2.resizeRowToContents(0);
+    view3.resizeRowToContents(0);
+    QCOMPARE(view1.rowHeight(0), view3.rowHeight(0));
+    QCOMPARE(view2.rowHeight(0), view3.rowHeight(0));
+
+    view3.resizeColumnToContents(0);
+    view3.resizeRowToContents(0);
+    // height should be only 1 text line for easy testing
+    view1.setRowHeight(0, view3.verticalHeader()->sectionSize(0));
+    view2.setRowHeight(0, view3.verticalHeader()->sectionSize(0));
+    view1.resizeColumnToContents(0);
+    view2.resizeColumnToContents(1);
+    QCOMPARE(view1.columnWidth(0), view3.columnWidth(0) - view1.columnWidth(1));
+    QCOMPARE(view2.columnWidth(0), view3.columnWidth(0) - view2.columnWidth(1));
+}
+
 QT_BEGIN_NAMESPACE
 extern bool Q_WIDGETS_EXPORT qt_tab_all_widgets(); // qapplication.cpp
 QT_END_NAMESPACE
diff -Naur a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -41,6 +41,7 @@
 
 #include <private/qguiapplication_p.h>
 #include <qpa/qplatformintegration.h>
+#include <qpa/qplatformtheme.h>
 
 class tst_QAbstractButton : public QObject
 {
@@ -76,6 +77,8 @@
     void keyNavigation();
 #endif
 
+    void buttonPressKeys();
+
 protected slots:
     void onClicked();
     void onToggled( bool on );
@@ -269,7 +272,13 @@
         QCOMPARE(press_count, click_count);
         QVERIFY(click_count > 1);
         break;
-    case 4:
+    case 4: {
+        const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                             ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                             .value<QList<Qt::Key>>();
+        if (buttonPressKeys.contains(Qt::Key_Enter)) {
+            QSKIP("platform theme has Key_Enter in ButtonPressKeys");
+        }
         // check that pressing ENTER has no effect when autorepeat is false
         testWidget->setDown( false );
         testWidget->setAutoRepeat( false );
@@ -286,7 +295,14 @@
 
         QVERIFY( click_count == 0 );
         break;
-    case 5:
+    }
+    case 5: {
+        const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                             ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                             .value<QList<Qt::Key>>();
+        if (buttonPressKeys.contains(Qt::Key_Enter)) {
+            QSKIP("platform theme has Key_Enter in ButtonPressKeys");
+        }
         // check that pressing ENTER has no effect when autorepeat is true
         testWidget->setDown( false );
         testWidget->setAutoRepeat( true );
@@ -304,6 +320,7 @@
 
         QVERIFY( click_count == 0 );
         break;
+    }
     case 6:
         // verify autorepeat is off by default.
         MyButton tmp( 0);
@@ -651,5 +668,16 @@
 }
 #endif
 
+void tst_QAbstractButton::buttonPressKeys()
+{
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    for (int i = 0; i < buttonPressKeys.length(); ++i) {
+        QTest::keyClick(testWidget, buttonPressKeys[i]);
+        QCOMPARE(click_count, i + 1);
+    }
+}
+
 QTEST_MAIN(tst_QAbstractButton)
 #include "tst_qabstractbutton.moc"
diff -Naur a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -168,6 +168,7 @@
     void checkMenuItemPosWhenStyleSheetIsSet();
     void checkEmbeddedLineEditWhenStyleSheetIsSet();
     void propagateStyleChanges();
+    void buttonPressKeys();
 
 private:
     PlatformInputContext m_platformInputContext;
@@ -3642,5 +3643,24 @@
     QVERIFY(frameStyle.inquired);
 }
 
+void tst_QComboBox::buttonPressKeys()
+{
+    QComboBox comboBox;
+    comboBox.setEditable(false);
+    comboBox.addItem(QString::number(1));
+    comboBox.addItem(QString::number(2));
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    for (int i = 0; i < buttonPressKeys.length(); ++i) {
+        QTest::keyClick(&comboBox, buttonPressKeys[i]);
+        // On some platforms, a window will not be immediately visible,
+        // but take some event-loop iterations to complete.
+        // Using QTRY_VERIFY to deal with that.
+        QTRY_VERIFY(comboBox.view()->isVisible());
+        comboBox.hidePopup();
+    }
+}
+
 QTEST_MAIN(tst_QComboBox)
 #include "tst_qcombobox.moc"
diff -Naur a/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro b/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro	2024-05-09 16:34:52.621316163 +0200
@@ -1,6 +1,6 @@
 CONFIG += testcase
 TARGET = tst_qcommandlinkbutton
-QT += widgets testlib
+QT += widgets testlib gui-private
 SOURCES  += tst_qcommandlinkbutton.cpp
 
 
diff -Naur a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -40,6 +40,9 @@
 #include <QGridLayout>
 #include <QPainter>
 
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformtheme.h>
+
 class tst_QCommandLinkButton : public QObject
 {
     Q_OBJECT
@@ -223,6 +226,13 @@
     // check that pressing ENTER has no effect
     resetCounters();
     testWidget->setDown( false );
+    // Skip after reset if ButtonPressKeys has Key_Enter
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    if (buttonPressKeys.contains(Qt::Key_Enter)) {
+        return;
+    }
     testWidget->setAutoRepeat( false );
     QTest::keyPress( testWidget, Qt::Key_Enter );
 
@@ -255,6 +265,14 @@
     QCOMPARE( press_count, (uint)1 );
     QCOMPARE( release_count, (uint)1 );
 
+    // Skip if ButtonPressKeys has Key_Enter
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    if (buttonPressKeys.contains(Qt::Key_Enter)) {
+        return;
+    }
+
     QTest::keyPress( testWidget,Qt::Key_Enter );
     QCOMPARE( press_count, (uint)1 );
     QCOMPARE( release_count, (uint)1 );
diff -Naur a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
--- a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -42,6 +42,7 @@
     void valueChanged();
     void sliderMoved();
     void wrappingCheck();
+    void minEqualMaxValueOutsideRange();
 };
 
 // Testing get/set functions
@@ -194,5 +195,14 @@
     }
 }
 
+// QTBUG-104641
+void tst_QDial::minEqualMaxValueOutsideRange()
+{
+    QDial dial;
+    dial.setRange(30, 30);
+    dial.setWrapping(true);
+    dial.setValue(45);
+}
+
 QTEST_MAIN(tst_QDial)
 #include "tst_qdial.moc"
diff -Naur a/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro b/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro
--- a/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro	2024-05-09 16:34:52.621316163 +0200
@@ -1,6 +1,6 @@
 CONFIG += testcase
 TARGET = tst_qgroupbox
-QT += widgets testlib
+QT += widgets testlib gui-private
 SOURCES  += tst_qgroupbox.cpp
 
 
diff -Naur a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
--- a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -35,6 +35,9 @@
 #include <QRadioButton>
 #include <QDialog>
 
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformtheme.h>
+
 #include "qgroupbox.h"
 
 class tst_QGroupBox : public QObject
@@ -69,6 +72,7 @@
     void propagateFocus();
     void task_QTBUG_19170_ignoreMouseReleaseEvent();
     void task_QTBUG_15519_propagateMouseEvents();
+    void buttonPressKeys();
 
 private:
     bool checked;
@@ -610,6 +614,20 @@
     QCOMPARE(parent.mouseMoved, true);
 }
 
+void tst_QGroupBox::buttonPressKeys()
+{
+    QGroupBox groupBox;
+    groupBox.setCheckable(true);
+    QSignalSpy clickedSpy(&groupBox, &QGroupBox::clicked);
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    for (int i = 0; i < buttonPressKeys.length(); ++i) {
+        QTest::keyClick(&groupBox, buttonPressKeys[i]);
+        QCOMPARE(clickedSpy.length(), i + 1);
+    }
+}
+
 void tst_QGroupBox::sendMouseMoveEvent(QWidget *widget, const QPoint &localPos)
 {
     // Send a MouseMove event without actually moving the pointer
diff -Naur a/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro b/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro
--- a/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro	2024-05-09 16:34:52.621316163 +0200
@@ -1,6 +1,6 @@
 CONFIG += testcase
 TARGET = tst_qpushbutton
-QT += widgets testlib
+QT += widgets testlib gui-private
 SOURCES  += tst_qpushbutton.cpp
 
 
diff -Naur a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -41,6 +41,9 @@
 #include <QStyleFactory>
 #include <QTabWidget>
 
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformtheme.h>
+
 class tst_QPushButton : public QObject
 {
 Q_OBJECT
@@ -212,6 +215,13 @@
     // check that pressing ENTER has no effect
     resetCounters();
     testWidget->setDown( false );
+    // Skip after reset if ButtonPressKeys has Key_Enter
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    if (buttonPressKeys.contains(Qt::Key_Enter)) {
+        return;
+    }
     testWidget->setAutoRepeat( false );
     QTest::keyPress( testWidget, Qt::Key_Enter );
 
@@ -247,6 +257,14 @@
     QCOMPARE( press_count, (uint)1 );
     QCOMPARE( release_count, (uint)1 );
 
+    // Skip if ButtonPressKeys has Key_Enter
+    const auto buttonPressKeys = QGuiApplicationPrivate::platformTheme()
+                                         ->themeHint(QPlatformTheme::ButtonPressKeys)
+                                         .value<QList<Qt::Key>>();
+    if (buttonPressKeys.contains(Qt::Key_Enter)) {
+        return;
+    }
+
     QTest::keyPress( testWidget,Qt::Key_Enter );
     QCOMPARE( press_count, (uint)1 );
     QCOMPARE( release_count, (uint)1 );
diff -Naur a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -37,7 +37,6 @@
 
 #include "parser.h"
 
-static QTextStream qout(stdout, QIODevice::WriteOnly);
 static QTextStream qerr(stderr, QIODevice::WriteOnly);
 
 static void usage()
@@ -79,19 +78,15 @@
     if (out_file_name.isEmpty())
         out_file_name = file_name + ".ref";
 
-    QFile _out_file;
-    QTextStream _out_stream;
-    QTextStream *out_stream;
+    QFile out_file;
     if (out_file_name == "-") {
-        out_stream = &qout;
+        out_file.open(stdout, QFile::WriteOnly);
     } else {
-        _out_file.setFileName(out_file_name);
-        if (!_out_file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
+        out_file.setFileName(out_file_name);
+        if (!out_file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
             qerr << "Could not open " << out_file_name << ": " << strerror(errno) << Qt::endl;
             return 1;
         }
-        _out_stream.setDevice(&_out_file);
-        out_stream = &_out_stream;
     }
 
     Parser parser;
@@ -102,9 +97,7 @@
 
     parser.parseFile(&in_file);
 
-    out_stream->setCodec("utf8");
-
-    *out_stream << parser.result();
+    out_file.write(parser.result().toUtf8());
 
     return 0;
 }
diff -Naur a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -142,11 +142,12 @@
 QString ContentHandler::escapeStr(const QString &s)
 {
     QString result = s;
-    result.replace(QRegularExpression("\""), "\\\"");
-    result.replace(QRegularExpression("\\"), "\\\\");
-    result.replace(QRegularExpression("\n"), "\\n");
-    result.replace(QRegularExpression("\r"), "\\r");
-    result.replace(QRegularExpression("\t"), "\\t");
+    result.replace(QChar(0), "\\0");
+    result.replace("\\", "\\\\");
+    result.replace("\"", "\\\"");
+    result.replace("\n", "\\n");
+    result.replace("\r", "\\r");
+    result.replace("\t", "\\t");
     return result;
 }
 
diff -Naur a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
--- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp	2023-10-17 14:50:53.000000000 +0200
+++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp	2024-05-09 16:34:52.621316163 +0200
@@ -311,14 +311,12 @@
     QVERIFY(file.open(QIODevice::ReadOnly));
     Parser parser;
 
-    QEXPECT_FAIL(QFINDTESTDATA("xmldocs/valid/sa/089.xml").toLocal8Bit().constData(), "a form feed character is not accepted in XML", Continue);
     QVERIFY(parser.parseFile(&file));
 
     QFile ref_file(file_name + ".ref");
     QVERIFY(ref_file.open(QIODevice::ReadOnly | QIODevice::Text));
-    QTextStream ref_stream(&ref_file);
-    ref_stream.setCodec("UTF-8");
-    QString ref_file_contents = ref_stream.readAll();
+    QByteArray data = ref_file.readAll();
+    QString ref_file_contents = QString::fromUtf8(data.constData(), data.size());
 
     QCOMPARE(parser.result(), ref_file_contents);
 }
@@ -393,9 +391,7 @@
 
     QFile ref_file(file_name + ".ref");
     QVERIFY(ref_file.open(QIODevice::ReadOnly | QIODevice::Text));
-    QTextStream ref_stream(&ref_file);
-    ref_stream.setCodec("UTF-8");
-    QString ref_file_contents = ref_stream.readAll();
+    QString ref_file_contents = QString::fromUtf8(ref_file.readAll());
 
     QEXPECT_FAIL(QFINDTESTDATA("xmldocs/not-wf/sa/145.xml").toLocal8Bit().constData(), "Surrogate code point 0xD800 should be rejected", Continue);
 
@@ -469,9 +465,7 @@
 
     QFile ref_file(file_name + ".ref");
     QVERIFY(ref_file.open(QIODevice::ReadOnly | QIODevice::Text));
-    QTextStream ref_stream(&ref_file);
-    ref_stream.setCodec("UTF-8");
-    QString ref_file_contents = ref_stream.readAll();
+    QString ref_file_contents = QString::fromUtf8(ref_file.readAll());
 
     QCOMPARE(parser.result(), ref_file_contents);
 }
