diff --git a/qtbase/src/widgets/widgets/qcombobox.cpp b/qtbase/src/widgets/widgets/qcombobox.cpp
index 9f6a6bb545..8c6703db46 100644
--- a/qtbase/src/widgets/widgets/qcombobox.cpp
+++ b/qtbase/src/widgets/widgets/qcombobox.cpp
@@ -2178,12 +2178,6 @@ void QComboBoxPrivate::setCurrentIndex(const QModelIndex &mi)
         indexBeforeChange = -1;
 
     if (indexChanged || modelResetToEmpty) {
-        QItemSelectionModel::SelectionFlags selectionMode = QItemSelectionModel::ClearAndSelect;
-        if (q->view()->selectionBehavior() == QAbstractItemView::SelectRows)
-            selectionMode.setFlag(QItemSelectionModel::Rows);
-        if (auto *model = q->view()->selectionModel())
-            model->setCurrentIndex(currentIndex, selectionMode);
-
         q->update();
         emitCurrentIndexChanged(currentIndex);
     }
@@ -2617,6 +2611,11 @@ void QComboBox::showPopup()
         return;
 #endif // Q_OS_MAC
 
+    // set current item and select it
+    QItemSelectionModel::SelectionFlags selectionMode = QItemSelectionModel::ClearAndSelect;
+    if (view()->selectionBehavior() == QAbstractItemView::SelectRows)
+        selectionMode.setFlag(QItemSelectionModel::Rows);
+    view()->selectionModel()->setCurrentIndex(d->currentIndex, selectionMode);
     QComboBoxPrivateContainer* container = d->viewContainer();
     QRect listRect(style->subControlRect(QStyle::CC_ComboBox, &opt,
                                          QStyle::SC_ComboBoxListBoxPopup, this));
diff --git a/qtbase/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/qtbase/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 455ccf3c35..5d8fff15eb 100644
--- a/qtbase/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/qtbase/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -3711,8 +3711,6 @@ void tst_QAccessibility::comboBoxTest()
     QCOMPARE(iface->text(QAccessible::Name), QLatin1String("one"));
 #endif
     QCOMPARE(iface->text(QAccessible::Value), QLatin1String("one"));
-    QCOMPARE(combo.view()->selectionModel()->currentIndex().row(), 0);
-
     combo.setCurrentIndex(2);
 #ifdef Q_OS_UNIX
     QCOMPARE(iface->text(QAccessible::Name), QLatin1String("three"));
@@ -3723,13 +3721,7 @@ void tst_QAccessibility::comboBoxTest()
     QCOMPARE(listIface->role(), QAccessible::List);
     QCOMPARE(listIface->childCount(), 3);
 
-    QAccessibleSelectionInterface *selectionIface = listIface->selectionInterface();
-    QVERIFY(selectionIface);
-    QCOMPARE(selectionIface->selectedItemCount(), 1);
-    QCOMPARE(listIface->indexOfChild(selectionIface->selectedItem(0)), 2);
-
     QVERIFY(!combo.view()->isVisible());
-    QCOMPARE(combo.view()->selectionModel()->currentIndex().row(), 2);
     QVERIFY(iface->actionInterface());
     QCOMPARE(iface->actionInterface()->actionNames(), QStringList() << QAccessibleActionInterface::showMenuAction() << QAccessibleActionInterface::pressAction());
     iface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
diff --git a/qtbase/cmake/QtAutoDetectHelpers.cmake b/qtbase/cmake/QtAutoDetectHelpers.cmake
index 6e6473da641..2fc573f01ec 100644
--- a/qtbase/cmake/QtAutoDetectHelpers.cmake
+++ b/qtbase/cmake/QtAutoDetectHelpers.cmake
@@ -329,9 +329,6 @@ function(qt_auto_detect_apple)
     _qt_internal_get_apple_sdk_version(apple_sdk_version)
     set(QT_MAC_SDK_VERSION "${apple_sdk_version}" CACHE STRING "Darwin SDK version.")
 
-    _qt_internal_get_xcode_version_raw(xcode_version_raw)
-    set(QT_MAC_XCODE_VERSION "${xcode_version_raw}" CACHE STRING "Xcode version.")
-
     if(NOT CMAKE_SYSTEM_NAME)
         # macOS
         list(LENGTH CMAKE_OSX_ARCHITECTURES arch_count)
diff --git a/qtbase/cmake/QtBaseConfigureTests.cmake b/qtbase/cmake/QtBaseConfigureTests.cmake
index ade53369b46..0b526ef8dac 100644
--- a/qtbase/cmake/QtBaseConfigureTests.cmake
+++ b/qtbase/cmake/QtBaseConfigureTests.cmake
@@ -277,7 +277,6 @@ function(qt_internal_print_cmake_darwin_info)
         message(STATUS "QT_APPLE_SDK_PATH: \"${QT_APPLE_SDK_PATH}\"")
         message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET: \"${CMAKE_OSX_DEPLOYMENT_TARGET}\"")
         message(STATUS "QT_MAC_SDK_VERSION: \"${QT_MAC_SDK_VERSION}\"")
-        message(STATUS "QT_MAC_XCODE_VERSION: \"${QT_MAC_XCODE_VERSION}\"")
 
         if(DEFINED CACHE{QT_IS_MACOS_UNIVERSAL})
             message(STATUS "QT_IS_MACOS_UNIVERSAL: \"${QT_IS_MACOS_UNIVERSAL}\"")
diff --git a/qtbase/cmake/QtPublicAppleHelpers.cmake b/qtbase/cmake/QtPublicAppleHelpers.cmake
index 3ffe53c6f34..1604150983c 100644
--- a/qtbase/cmake/QtPublicAppleHelpers.cmake
+++ b/qtbase/cmake/QtPublicAppleHelpers.cmake
@@ -928,46 +928,6 @@ function(_qt_internal_get_apple_sdk_version out_var)
     set(${out_var} "${sdk_version}" PARENT_SCOPE)
 endfunction()
 
-function(_qt_internal_get_xcode_version_raw out_var)
-    set(xcode_version "")
-    if(APPLE)
-        _qt_internal_execute_xcrun(xcode_version
-            XCRUN_ARGS xcodebuild -version
-            OUT_ERROR_VAR xcrun_error
-        )
-
-        string(REPLACE "\n" " " xcode_version "${xcode_version}")
-        string(STRIP "${xcode_version}" xcode_version)
-
-        if(NOT xcode_version)
-            message(FATAL_ERROR
-                    "Can't determine Xcode version. Is Xcode installed?"
-                    " Error details:\n${xcrun_error}")
-        endif()
-    endif()
-    set(${out_var} "${xcode_version}" PARENT_SCOPE)
-endfunction()
-
-function(_qt_internal_get_xcode_version out_var)
-    if(APPLE)
-        _qt_internal_get_xcode_version_raw(xcode_version_raw)
-
-        # The raw output is something like after the newlines are replaced with spaces:
-        # Xcode 14.3 Build version 14E222b
-        # We want only the '14.3' part. We could be more specific with the regex to match only
-        # digits separated by dots, but you never know how Apple might change the format.
-        string(REGEX REPLACE "Xcode (([^ ])+)" "\\2" xcode_version "${xcode_version_raw}")
-        if(xcode_version_raw MATCHES "Xcode ([^ ]+)")
-            set(xcode_version "${CMAKE_MATCH_1}")
-        else()
-            message(DEBUG "Failed to extract Xcode version from '${xcode_version_raw}'")
-            set(xcode_version "${xcode_version_raw}")
-        endif()
-
-        set(${out_var} "${xcode_version}" PARENT_SCOPE)
-    endif()
-endfunction()
-
 function(_qt_internal_get_cached_apple_sdk_version out_var)
     if(QT_INTERNAL_APPLE_SDK_VERSION)
         set(sdk_version "${QT_INTERNAL_APPLE_SDK_VERSION}")
@@ -979,17 +939,6 @@ function(_qt_internal_get_cached_apple_sdk_version out_var)
     set(${out_var} "${sdk_version}" PARENT_SCOPE)
 endfunction()
 
-function(_qt_internal_get_cached_xcode_version out_var)
-    if(QT_INTERNAL_XCODE_VERSION)
-        set(xcode_version "${QT_INTERNAL_XCODE_VERSION}")
-    else()
-        _qt_internal_get_xcode_version(xcode_version)
-        set(QT_INTERNAL_XCODE_VERSION "${xcode_version}" CACHE STRING "Xcode version")
-    endif()
-
-    set(${out_var} "${xcode_version}" PARENT_SCOPE)
-endfunction()
-
 # Warn or error out when the platform SDK or Xcode version are not supported.
 #
 # The messages are currently only shown when building Qt, not when building user projects
@@ -1028,7 +977,6 @@ function(_qt_internal_check_apple_sdk_and_xcode_versions)
     endif()
 
     _qt_internal_get_cached_apple_sdk_version(sdk_version)
-    _qt_internal_get_cached_xcode_version(xcode_version)
 
     if(NOT max_sdk_version MATCHES "^[0-9]+$")
         message(FATAL_ERROR
@@ -1075,14 +1023,6 @@ function(_qt_internal_check_apple_sdk_and_xcode_versions)
         )
     endif()
 
-    if(xcode_version VERSION_LESS min_xcode_version AND NOT QT_NO_XCODE_MIN_VERSION_CHECK)
-        message(${message_type}
-            "Qt requires at least version ${min_xcode_version} of Xcode, "
-            "you're building against version ${xcode_version}. Please upgrade."
-            ${extra_message}
-        )
-    endif()
-
     if(QT_NO_APPLE_SDK_MAX_VERSION_CHECK)
         return()
     endif()
diff --git a/qtbase/src/widgets/dialogs/qmessagebox.cpp b/qtbase/src/widgets/dialogs/qmessagebox.cpp
index f24cd905cc..a7be216aba 100644
--- a/qtbase/src/widgets/dialogs/qmessagebox.cpp
+++ b/qtbase/src/widgets/dialogs/qmessagebox.cpp
@@ -2851,7 +2851,6 @@ bool QMessageBoxPrivate::canBeNativeDialog() const
         return true;
     if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
         || q->testAttribute(Qt::WA_DontShowOnScreen)
-        || q->testAttribute(Qt::WA_StyleSheet)
         || (options->options() & QMessageDialogOptions::Option::DontUseNativeDialog)) {
         return false;
     }
diff --git a/qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp b/qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
index 7d9bf9bc241..ef3a21a114d 100644
--- a/qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
+++ b/qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
@@ -114,15 +114,15 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
     } else if (classname == "QMenu"_L1) {
         iface = new QAccessibleMenu(widget);
 #endif
-#if QT_CONFIG(treeview)
+#if QT_CONFIG(treeview) && !defined(Q_OS_MACOS)
     } else if (classname == "QTreeView"_L1) {
         iface = new QAccessibleTree(widget);
 #endif // QT_CONFIG(treeview)
-#if QT_CONFIG(listview)
+#if QT_CONFIG(listview) && !defined(Q_OS_MACOS)
     } else if (classname == "QListView"_L1) {
         iface = new QAccessibleList(widget);
 #endif
-#if QT_CONFIG(itemviews)
+#if QT_CONFIG(itemviews) && !defined(Q_OS_MACOS)
     } else if (classname == "QTableView"_L1) {
         iface = new QAccessibleTable(widget);
 #endif // QT_CONFIG(itemviews)
diff --git a/qtbase/src/widgets/itemviews/qabstractitemview.cpp b/qtbase/src/widgets/itemviews/qabstractitemview.cpp
index c04a699a56c..16b6f0bef60 100644
--- a/qtbase/src/widgets/itemviews/qabstractitemview.cpp
+++ b/qtbase/src/widgets/itemviews/qabstractitemview.cpp
@@ -30,7 +30,7 @@
 #include <private/qapplication_p.h>
 #include <private/qguiapplication_p.h>
 #include <private/qscrollbar_p.h>
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
 #include <qaccessible.h>
 #endif
 #if QT_CONFIG(gestures) && QT_CONFIG(scroller)
@@ -1131,7 +1131,7 @@ void QAbstractItemView::reset()
     setRootIndex(QModelIndex());
     if (d->selectionModel)
         d->selectionModel->reset();
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(this, QAccessibleTableModelChangeEvent::ModelReset);
         QAccessible::updateAccessibility(&accessibleEvent);
@@ -1153,7 +1153,7 @@ void QAbstractItemView::setRootIndex(const QModelIndex &index)
         return;
     }
     d->root = index;
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(this, QAccessibleTableModelChangeEvent::ModelReset);
         QAccessible::updateAccessibility(&accessibleEvent);
@@ -3415,7 +3415,7 @@ void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelInde
         }
     }
 
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(this, QAccessibleTableModelChangeEvent::DataChanged);
         accessibleEvent.setFirstRow(topLeft.row());
@@ -3543,7 +3543,7 @@ void QAbstractItemViewPrivate::rowsRemoved(const QModelIndex &index, int star
     if (q->isVisible())
         q->updateEditorGeometries();
     q->setState(QAbstractItemView::NoState);
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::RowsRemoved);
         accessibleEvent.setFirstRow(start);
@@ -3634,7 +3634,7 @@ void QAbstractItemViewPrivate::columnsRemoved(const QModelIndex &index, int s
     if (q->isVisible())
         q->updateEditorGeometries();
     q->setState(QAbstractItemView::NoState);
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::ColumnsRemoved);
         accessibleEvent.setFirstColumn(start);
@@ -3657,7 +3657,7 @@ void QAbstractItemViewPrivate::rowsInserted(const QModelIndex &index, int sta
     Q_UNUSED(start);
     Q_UNUSED(end);
 
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     Q_Q(QAbstractItemView);
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::RowsInserted);
@@ -3683,7 +3683,7 @@ void QAbstractItemViewPrivate::columnsInserted(const QModelIndex &index, int
     Q_Q(QAbstractItemView);
     if (q->isVisible())
         q->updateEditorGeometries();
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::ColumnsInserted);
         accessibleEvent.setFirstColumn(start);
@@ -3711,7 +3711,7 @@ void QAbstractItemViewPrivate::modelDestroyed()
 void QAbstractItemViewPrivate::layoutChanged()
 {
     doDelayedItemsLayout();
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     Q_Q(QAbstractItemView);
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::ModelReset);
diff --git a/qtbase/src/widgets/itemviews/qlistview.cpp b/qtbase/src/widgets/itemviews/qlistview.cpp
index a4cb4c76fbc..2b966578c45 100644
--- a/qtbase/src/widgets/itemviews/qlistview.cpp
+++ b/qtbase/src/widgets/itemviews/qlistview.cpp
@@ -5,7 +5,7 @@
 #include "qlistview.h"
 
 #include <qabstractitemdelegate.h>
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
 #include <qaccessible.h>
 #endif
 #include <qapplication.h>
@@ -1622,7 +1622,7 @@ void QListView::setModelColumn(int column)
         return;
     d->column = column;
     d->doDelayedItemsLayout();
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         QAccessibleTableModelChangeEvent event(this, QAccessibleTableModelChangeEvent::ModelReset);
         QAccessible::updateAccessibility(&event);
@@ -3406,7 +3406,7 @@ void QIconModeViewBase::updateContentsSize()
 void QListView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
 {
     QAbstractItemView::currentChanged(current, previous);
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         if (current.isValid() && hasFocus()) {
             int entry = visualIndex(current);
@@ -3424,7 +3424,7 @@ void QListView::currentChanged(const QModelIndex &current, const QModelIndex &pr
 void QListView::selectionChanged(const QItemSelection &selected,
                                  const QItemSelection &deselected)
 {
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         // ### does not work properly for selection ranges.
         QModelIndex sel = selected.indexes().value(0);
diff --git a/qtbase/src/widgets/itemviews/qtableview.cpp b/qtbase/src/widgets/itemviews/qtableview.cpp
index 9d6499de5b9..d4c4da32ab4 100644
--- a/qtbase/src/widgets/itemviews/qtableview.cpp
+++ b/qtbase/src/widgets/itemviews/qtableview.cpp
@@ -19,7 +19,7 @@
 #include <private/qtableview_p.h>
 #include <private/qheaderview_p.h>
 #include <private/qscrollbar_p.h>
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
 #include <qaccessible.h>
 #endif
 
@@ -3476,7 +3476,7 @@ void QTableViewPrivate::selectColumn(int column, bool anchor)
  */
 void QTableView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
 {
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         if (current.isValid() && hasFocus()) {
             Q_D(QTableView);
@@ -3498,7 +3498,7 @@ void QTableView::selectionChanged(const QItemSelection &selected,
 {
     Q_D(QTableView);
     Q_UNUSED(d);
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         // ### does not work properly for selection ranges.
         QModelIndex sel = selected.indexes().value(0);
diff --git a/qtbase/src/widgets/itemviews/qtreeview.cpp b/qtbase/src/widgets/itemviews/qtreeview.cpp
index 744f29ca17..b638c7292d 100644
--- a/qtbase/src/widgets/itemviews/qtreeview.cpp
+++ b/qtbase/src/widgets/itemviews/qtreeview.cpp
@@ -15,7 +15,7 @@
 #include <qdebug.h>
 #include <QMetaMethod>
 #include <private/qscrollbar_p.h>
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
 #include <qaccessible.h>
 #endif
 
@@ -3356,7 +3356,7 @@ void QTreeViewPrivate::columnsRemoved(const QModelIndex &parent, int start, int
 
 void QTreeViewPrivate::updateAccessibility()
 {
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     Q_Q(QTreeView);
     if (pendingAccessibilityUpdate) {
         pendingAccessibilityUpdate = false;
@@ -3389,7 +3389,7 @@ void QTreeViewPrivate::layout(int i, bool recursiveExpanding, bool afterIsUninit
         return;
     }
 
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     // QAccessibleTree's rowCount implementation uses viewItems.size(), so
     // we need to invalidate any cached accessibility data structures if
     // that value changes during the run of this function.
@@ -4069,8 +4069,8 @@ void QTreeView::currentChanged(const QModelIndex &current, const QModelIndex &pr
         if (current.isValid())
             viewport()->update(d->visualRect(current, QTreeViewPrivate::FullRow));
     }
-#if QT_CONFIG(accessibility)
-    if (QAccessible::isActive() && current.isValid() && hasFocus()) {
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
+    if (QAccessible::isActive() && current.isValid()) {
         Q_D(QTreeView);
 
         QAccessibleEvent event(this, QAccessible::Focus);
@@ -4087,7 +4087,7 @@ void QTreeView::selectionChanged(const QItemSelection &selected,
                                  const QItemSelection &deselected)
 {
     QAbstractItemView::selectionChanged(selected, deselected);
-#if QT_CONFIG(accessibility)
+#if QT_CONFIG(accessibility) && !defined(Q_OS_MACOS)
     if (QAccessible::isActive()) {
         Q_D(QTreeView);
 
diff --git a/qtbase/src/gui/kernel/qguiapplication.cpp b/qtbase/src/gui/kernel/qguiapplication.cpp
index 4c819e0915..6070a01334 100644
--- a/qtbase/src/gui/kernel/qguiapplication.cpp
+++ b/qtbase/src/gui/kernel/qguiapplication.cpp
@@ -1409,7 +1409,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
     const bool defaultIsWayland = !defaultIsXcb && platformPluginBase.startsWith("wayland");
     const QByteArray waylandPlatformName = defaultIsWayland ? platformName : "wayland";
     if (hasWaylandDisplay || isWaylandSessionType) {
-        preferredPlatformOrder.prepend(waylandPlatformName);
+        preferredPlatformOrder.append(waylandPlatformName);
 
         if (defaultIsWayland)
             platformName.clear();
diff --git a/qtbase/src/corelib/global/qnumeric.h b/qtbase/src/corelib/global/qnumeric.h
index bc2bbf9e53e..e82f90445a7 100644
--- a/qtbase/src/corelib/global/qnumeric.h
+++ b/qtbase/src/corelib/global/qnumeric.h
@@ -496,6 +496,7 @@ template <typename Result,
           typename std::enable_if_t<std::is_floating_point_v<FP>, bool> = true>
 constexpr inline Result qCheckedFPConversionToInteger(FP value)
 {
+/*
 #ifdef QT_SUPPORTS_IS_CONSTANT_EVALUATED
     if (!q20::is_constant_evaluated())
         Q_ASSERT(!std::isnan(value));
@@ -517,6 +518,7 @@ constexpr inline Result qCheckedFPConversionToInteger(FP value)
 
     // If both checks passed, the result of truncation is representable
     // as `Result`:
+*/
     return Result(value);
 }
 
diff --git a/qtbase/src/gui/painting/qdrawhelper.cpp b/qtbase/src/gui/painting/qdrawhelper.cpp
index 5cb5b9eb92f..3c6d429fd18 100644
--- a/qtbase/src/gui/painting/qdrawhelper.cpp
+++ b/qtbase/src/gui/painting/qdrawhelper.cpp
@@ -3967,7 +3967,7 @@ static void spanfill_from_first(QRasterBuffer *rasterBuffer, QPixelLayout::BPP b
 
 // -------------------- blend methods ---------------------
 
-#if QT_CONFIG(qtgui_threadpool)
+/*#if QT_CONFIG(qtgui_threadpool)
 #define QT_THREAD_PARALLEL_FILLS(function) \
     const int segments = (count + 32) / 64; \
     QThreadPool *threadPool = QGuiApplicationPrivate::qtGuiThreadPool(); \
@@ -3986,9 +3986,9 @@ static void spanfill_from_first(QRasterBuffer *rasterBuffer, QPixelLayout::BPP b
         semaphore.acquire(segments); \
     } else \
         function(0, count)
-#else
+#else*/
 #define QT_THREAD_PARALLEL_FILLS(function) function(0, count)
-#endif
+//#endif
 
 static void blend_color_generic(int count, const QT_FT_Span *spans, void *userData)
 {
diff --git a/qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm b/qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm
index b1605d2c783..586c88ce5f6 100644
--- a/qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/qtbase/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -215,15 +215,6 @@ inline QMacPaletteMap(QPlatformTheme::Palette p, NSColor *a, NSColor *i) :
 QCocoaTheme::QCocoaTheme()
     : m_systemPalette(nullptr)
 {
-    m_appearanceObserver = QMacKeyValueObserver(NSApp, @"effectiveAppearance", [this] {
-        handleSystemThemeChange();
-    });
-
-    m_systemColorObserver = QMacNotificationObserver(nil,
-        NSSystemColorsDidChangeNotification, [this] {
-            handleSystemThemeChange();
-    });
-
     updateColorScheme();
 }
 
diff --git a/qtbase/src/widgets/dialogs/qmessagebox.cpp b/qtbase/src/widgets/dialogs/qmessagebox.cpp
index b4d76bc5ec..42853617a6 100644
--- a/qtbase/src/widgets/dialogs/qmessagebox.cpp
+++ b/qtbase/src/widgets/dialogs/qmessagebox.cpp
@@ -798,6 +798,9 @@ QMessageBox::QMessageBox(QWidget *parent)
 {
     Q_D(QMessageBox);
     d->init();
+
+    if (parent)
+        setWindowModality(Qt::WindowModal);
 }
 
 /*!
diff --git a/qtbase/src/gui/text/qtextimagehandler.cpp b/qtbase/src/gui/text/qtextimagehandler.cpp
index 70e8961467..1b246a82e6 100644
--- a/qtbase/src/gui/text/qtextimagehandler.cpp
+++ b/qtbase/src/gui/text/qtextimagehandler.cpp
@@ -133,6 +133,7 @@ void QTextImageHandler::drawObject(QPainter *p, const QRectF &rect, QTextDocumen
     Q_UNUSED(posInDocument);
         const QTextImageFormat imageFormat = format.toImageFormat();
 
+    p->setRenderHint(QPainter::SmoothPixmapTransform);
     if (QCoreApplication::instance()->thread() != QThread::currentThread()) {
         const QImage image = getAs<QImage>(doc, imageFormat, p->device()->devicePixelRatio());
         p->drawImage(rect, image, image.rect());
diff --git a/qtbase/src/plugins/platforms/cocoa/qcocoascreen.mm b/qtbase/src/plugins/platforms/cocoa/qcocoascreen.mm
index 0e5b704ca8..b594f680af 100644
--- a/qtbase/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/qtbase/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -522,6 +522,8 @@ void flushOutput() {
             QWindow *w = cocoaWindow->window();
             if (!w->isVisible())
                 return;
+            if (w->flags() & Qt::WindowTransparentForInput)
+                return;
 
             auto nativeGeometry = QHighDpi::toNativePixels(w->geometry(), w);
             if (!nativeGeometry.contains(point))
diff --git a/qtbase/src/gui/kernel/qevent.cpp b/qtbase/src/gui/kernel/qevent.cpp
index 326d9020f3..f9db205d74 100644
--- a/qtbase/src/gui/kernel/qevent.cpp
+++ b/qtbase/src/gui/kernel/qevent.cpp
@@ -1359,6 +1359,10 @@ QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const
 {
      if (type == QEvent::ShortcutOverride)
         ignore();
+
+	 // Ignore characters in the private use area, macOS for example uses these for arrow keys
+	 if (m_text.size() == 1 && m_text[0].unicode() >= 0xe000 && m_text[0].unicode() <= 0xf8ff)
+		 m_text = QString();
 }
 
 /*!
@@ -1388,6 +1392,10 @@ QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers,
 {
     if (type == QEvent::ShortcutOverride)
         ignore();
+
+	 // Ignore characters in the private use area, macOS for example uses these for arrow keys
+	 if (m_text.size() == 1 && m_text[0].unicode() >= 0xe000 && m_text[0].unicode() <= 0xf8ff)
+		 m_text = QString();
 }
 
 
diff --git a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm
index b987723b8a3..83c7f957577 100644
--- a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm
+++ b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm
@@ -101,7 +101,7 @@ IOSurfaceLockOptions lockOptionsForAccess(QPlatformGraphicsBuffer::AccessTypes a
 bool QIOSurfaceGraphicsBuffer::doLock(AccessTypes access, const QRect &rect)
 {
     Q_UNUSED(rect);
-    Q_ASSERT(!isLocked());
+    //Q_ASSERT(!isLocked());
 
     qCDebug(lcQpaIOSurface) << "Locking" << this << "for" << access;
 
